PXBCC ;ISL/JVS - CURSOR CONTROLS-UTILITY ROUTINES ;12/09/22 11:00am
;;1.0;PCE PATIENT CARE ENCOUNTER;**7,73,141,124,164,232**;Aug 12, 1996;Build 7
;
; Reference to ICRs
; ^ICPT( #5408
;
; Variable List
; PXBSAVE= A Second copy fo the top Margin in a window
; PXBCNT= A Count of how many Items listed in top window
;
ZERO ;--ZERO $X & $Y
N DX,DY
S DX=0,DY=0 X ^%ZOSF("XY")
Q
DXDY ;RESET $X $Y
X ^%ZOSF("XY")
Q
INHI() ; Switch to highlighted video (IOINHI must be defined by caller)
S DX=$X#81,DY=$Y#25 W IOINHI X ^%ZOSF("XY")
Q ""
INLO() ; Switch to lowlighted video (IOINLOW must be defined by caller)
S DX=$X#81,DY=$Y#25 W IOINLOW X ^%ZOSF("XY")
Q ""
FIX ;--FIX
D TERM,FULL0 W IOUOFF,IOG0
Q
FIX1 ;--FIX
D TERM,FULL0 W IOUOFF,IOG0
Q
WINDOW(PXBCNT,DOWN) ;--set up window area
N I,IOTM,IOBM
I PXBCNT>10 S IOTM=17
I PXBCNT<11 S IOTM=PXBCNT+7
S PXBSAVE=IOTM I '$D(IOSC) D TERM
S IOBM=(IOSL-1)
W IOSC W @IOSTBM W IORC ;--Create smaller window
I '$D(DOWN) F I=1:1:2 W IOCUD ;-- move cursor down twice
S PXBWIN=""
Q
WIN17(PXBCNT) ;--set up window area on the 17th line
N I,IOTM,IOBM
W IOCUOFF
S IOTM=17
S PXBSAVE=IOTM I '$D(IOSC) D TERM
S IOBM=(IOSL-0)
W IOSC W @IOSTBM W IORC ;--Create smaller window
S PXBWIN=""
W IOCUON
Q
;
WINDOW1(PXBCNT) ;--set up window area
N I,IOTM,IOBM
S IOBM=IOSL-1
W IOSC W @IOSTBM W IORC ;--Create smaller window
F I=1:1:2 W IOCUD ;-- move currsor down once
Q
;
TERM ;--set up the terminal variables
N X
S X="IOSGRO;IOSTBM;IOCUU;IOSC;IORC;IOCUD;IOHOME;IOELALL;IORVON;IORVOFF;IOCUF;IONEL;IOBON;IOBOFF;IOUON;IOUOFF;IOELEOL;IOEDALL;IOEDEOP;IOCUB;IOECH;IOELBOL;IOIND"
D ENDR^%ZISS,GSET^%ZISS
S X="IOINLOW;IOINHI;IOINORM;IOCUOFF;IOCUON;IORI;IOIND;IORESET;IOCUOFF;IOCUON;IOSGR0"
D ENDR^%ZISS
I IOSTBM="" S IOSTBM=1
Q
FULL ;--set terminal to full scrolling window
N IOTM,IOBM,X
K PXBWIN
I '$D(IOSTBM) D TERM
I IOSTBM]"" S IOTM=1,IOBM=(IOSL-(1)) W IOSC W @IOSTBM W IORC
S X=IOM X ^%ZOSF("RM")
Q
FULL0 ;--set terminal to full scrolling window
N IOTM,IOBM,X
I '$D(IOSTBM) D TERM
I IOSTBM]"" S IOTM=1,IOBM=IOSL W IOSC W @IOSTBM W IORC
S X=IOM X ^%ZOSF("RM")
Q
CLEAR1 ;--clean out all cursor control variables
D KILL^%ZISS,GKILL^%ZISS
Q
UNDON ;--underline on
I '$D(IOUON) D TERM^PXBCC
W IOUON
Q
UNDOFF ;--underline off
I '$D(IOUON) D TERM^PXBCC
W IOUOFF
Q
REVCPT(LINE,PXRVON) ;--Reverse Video a particular CPT CODE,PROVIDER OR POV
;
; INPUT: LINE = Selection from PXBSAM array
; PXRVON = Flag to turn reverse video on/off
; where: 1 = reverse video on
; 0 = reverse video off
;
Q:$G(NOREV)=1
N ENTRY,XLINE,I,IOTM,IOBM,COL,DX,DY
S ENTRY=$G(PXBSAM(LINE))
;Actual line on which CPT code displayed
;S XLINE=LINE#10+4
S XLINE=PXBSAM(LINE,"LINE")#10+4 ;PX*1.0*164
I XLINE<5 S XLINE=XLINE+10
I '$D(IOSC) D TERM
S COL=4
W IOSC S IOTM=1,IOBM=IOSL W @IOSTBM W IOHOME D ZERO
F I=1:1:XLINE W IOCUD
F I=1:1:COL W IOCUF
S DY=XLINE,DX=COL D DXDY
I $G(PXRVON) W IORVON,$P(^ICPT($P(ENTRY,"^",1),0),U),IORVOFF
I '$G(PXRVON) W IORVOFF,$P(ENTRY,"^",1)
S IOTM=PXBSAVE,IOBM=IOSL W @IOSTBM W IORC
Q
REVPRV(LINE) ;--Reverse Video a particular CPT CODE,PROVIDER OR POV
Q:$G(NOREV)=1 Q:$G(FROM)["CPT" Q:$G(FROM)["PL"
N ENTRY,XLINE,I,IOTM,IOBM,COL,DX,DY
S ENTRY=$G(PXBSAM(LINE)),XLINE=(LINE#10)+4
I XLINE<5 S XLINE=XLINE+10
I '$D(IOSC) D TERM
S COL=4
W IOSC S IOTM=1,IOBM=IOSL W @IOSTBM W IOHOME D ZERO
F I=1:1:XLINE W IOCUD
F I=1:1:COL W IOCUF
S DY=XLINE,DX=COL D DXDY
W IORVON,$P(ENTRY,"^",1),IORVOFF
S IOTM=PXBSAVE,IOBM=IOSL W @IOSTBM W IORC
Q
REVPOV(LINE) ;--Reverse Video a particular CPT CODE,PROVIDER OR POV
Q:$G(NOREV)=1
N ENTRY,XLINE,I,IOTM,IOBM,COL,DX,DY
S ENTRY=$G(PXBSAM(LINE)),XLINE=(LINE*2-1#10)+4
I XLINE<5 S XLINE=XLINE+10
I '$D(IOSC) D TERM
S COL=4
W IOSC S IOTM=1,IOBM=IOSL W @IOSTBM W IOHOME D ZERO
F I=1:1:XLINE W IOCUD
F I=1:1:COL W IOCUF
S DY=XLINE,DX=COL D DXDY
W IORVON,$J($P($P(ENTRY,"^",1),".",1),4),".",$P($P(ENTRY,"^",1),".",2),IORVOFF
S IOTM=PXBSAVE,IOBM=IOSL W @IOSTBM W IORC
Q
REVSTP(LINE) ;--Reverse Video a particular CPT CODE,PROVIDER OR POV
Q:$G(NOREV)=1
N ENTRY,XLINE,I,IOTM,IOBM,COL,DX,DY
S ENTRY=$G(PXBSAM(LINE)),XLINE=(LINE#10)+4
I XLINE<5 S XLINE=XLINE+10
I '$D(IOSC) D TERM
S COL=4
W IOSC S IOTM=1,IOBM=IOSL W @IOSTBM W IOHOME D ZERO
F I=1:1:XLINE W IOCUD
F I=1:1:COL W IOCUF
S DY=XLINE,DX=COL D DXDY
W IORVON,$P(ENTRY,"^",1),IORVOFF
S IOTM=PXBSAVE,IOBM=IOSL W @IOSTBM W IORC
Q
;
UREV(LINE) ;--Reverse Video a particular CPT CODE,PROVIDER OR POV
Q
;--**OUT OF ORDER
N ENTRY,XLINE,I,IOTM,IOBM,DX,DY
S ENTRY=$G(PXBSAM(LINE)),XLINE=LINE+4
I '$D(IOSC) D TERM
W IOSC S IOTM=1,IOBM=IOSL W @IOSTBM W IOHOME D ZERO
F I=1:1:XLINE W IOCUD
F I=1:1:4 W IOCUF
S DY=XLINE,DX=COL D DXDY
W $P(ENTRY,"^",1)
S IOTM=PXBSAVE,IOBM=IOSL W @IOSTBM W IORC
Q
;
RREV(LINE,COLUMN,ENTRY) ;--Reverse REQUESTED information
Q:$G(NOREV)=1
N XLINE,I,IOTM,IOBM,DX,DY
S XLINE=LINE+1
I '$D(IOSC) D TERM
W IOSC S IOTM=1,IOBM=IOSL W @IOSTBM W IOHOME D ZERO
F I=1:1:XLINE W IOCUD
F I=1:1:COLUMN W IOCUF
S DY=XLINE,DX=COLUMN D DXDY
W IOELEOL,IOINHI,ENTRY,IOINLOW
S IOTM=PXBSAVE,IOBM=IOSL W @IOSTBM W IORC
Q
RREVST(LINE,COLUMN,ENTRY) ;--Reverse REQUESTED information
Q:$G(NOREV)=1
N XLINE,I,IOTM,IOBM,DX,DY
S XLINE=LINE+1
I '$D(IOSC) D TERM
W IOSC S IOTM=1,IOBM=IOSL W @IOSTBM W IOHOME D ZERO
F I=1:1:XLINE W IOCUD
F I=1:1:COLUMN W IOCUF
S DY=XLINE,DX=COLUMN D DXDY
W IORVON,ENTRY,IORVOFF
S IOTM=PXBSAVE,IOBM=IOSL W @IOSTBM W IORC
Q
RREVH(LINE,COLUMN,ENTRY) ;--Reverse REQUESTED information
Q:$G(NOREV)=1
N XLINE,I,IOTM,IOBM,DX,DY
S XLINE=LINE+1
I '$D(IOSC) D TERM
W IOSC S IOTM=1,IOBM=IOSL W @IOSTBM W IOHOME D ZERO
F I=1:1:XLINE W IOCUD
F I=1:1:COLUMN W IOCUF
S DY=XLINE,DX=COLUMN D DXDY
W IOELEOL,IOINHI,IOUON,ENTRY,IOINLOW,IOUON F I=1:1:5 W " "
W IOUOFF
S IOTM=PXBSAVE,IOBM=IOSL W @IOSTBM W IORC
Q
LOC(LINE,COLUMN) ;--Locate Cursor to specified position
N PXBOS
S PXBOS=^%ZOSF("OS")
I PXBOS'["MSM" N DY,DX S DY=LINE,DX=COLUMN X IOXY,^%ZOSF("XY") Q
N XLINE,I,IOTM,IOBM,DX,DY
W IOCUOFF
I '$D(IOSTBM) D TERM
S IOTM=1,IOBM=IOSL W @IOSTBM W IOHOME D ZERO
I $D(LINE) F I=1:1:LINE W IOIND
F I=1:1:COLUMN W IOCUF
I $D(LINE) S DY=LINE
E S DY=$Y
S DX=COLUMN D DXDY
W IOCUON
Q
;
ERASE ;---ERASE THE LIST GOING UPWARDS
N PXI
I '$D(IOCUU) D TERM^PXBCC
D LOC^PXBCC(15,1)
S PXI=0 F I=1:1:11 W IORI,IOELALL
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXBCC 6680 printed Dec 13, 2024@02:26:24 Page 2
PXBCC ;ISL/JVS - CURSOR CONTROLS-UTILITY ROUTINES ;12/09/22 11:00am
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**7,73,141,124,164,232**;Aug 12, 1996;Build 7
+2 ;
+3 ; Reference to ICRs
+4 ; ^ICPT( #5408
+5 ;
+6 ; Variable List
+7 ; PXBSAVE= A Second copy fo the top Margin in a window
+8 ; PXBCNT= A Count of how many Items listed in top window
+9 ;
ZERO ;--ZERO $X & $Y
+1 NEW DX,DY
+2 SET DX=0
SET DY=0
XECUTE ^%ZOSF("XY")
+3 QUIT
DXDY ;RESET $X $Y
+1 XECUTE ^%ZOSF("XY")
+2 QUIT
INHI() ; Switch to highlighted video (IOINHI must be defined by caller)
+1 SET DX=$X#81
SET DY=$Y#25
WRITE IOINHI
XECUTE ^%ZOSF("XY")
+2 QUIT ""
INLO() ; Switch to lowlighted video (IOINLOW must be defined by caller)
+1 SET DX=$X#81
SET DY=$Y#25
WRITE IOINLOW
XECUTE ^%ZOSF("XY")
+2 QUIT ""
FIX ;--FIX
+1 DO TERM
DO FULL0
WRITE IOUOFF,IOG0
+2 QUIT
FIX1 ;--FIX
+1 DO TERM
DO FULL0
WRITE IOUOFF,IOG0
+2 QUIT
WINDOW(PXBCNT,DOWN) ;--set up window area
+1 NEW I,IOTM,IOBM
+2 IF PXBCNT>10
SET IOTM=17
+3 IF PXBCNT<11
SET IOTM=PXBCNT+7
+4 SET PXBSAVE=IOTM
IF '$DATA(IOSC)
DO TERM
+5 SET IOBM=(IOSL-1)
+6 ;--Create smaller window
WRITE IOSC
WRITE @IOSTBM
WRITE IORC
+7 ;-- move cursor down twice
IF '$DATA(DOWN)
FOR I=1:1:2
WRITE IOCUD
+8 SET PXBWIN=""
+9 QUIT
WIN17(PXBCNT) ;--set up window area on the 17th line
+1 NEW I,IOTM,IOBM
+2 WRITE IOCUOFF
+3 SET IOTM=17
+4 SET PXBSAVE=IOTM
IF '$DATA(IOSC)
DO TERM
+5 SET IOBM=(IOSL-0)
+6 ;--Create smaller window
WRITE IOSC
WRITE @IOSTBM
WRITE IORC
+7 SET PXBWIN=""
+8 WRITE IOCUON
+9 QUIT
+10 ;
WINDOW1(PXBCNT) ;--set up window area
+1 NEW I,IOTM,IOBM
+2 SET IOBM=IOSL-1
+3 ;--Create smaller window
WRITE IOSC
WRITE @IOSTBM
WRITE IORC
+4 ;-- move currsor down once
FOR I=1:1:2
WRITE IOCUD
+5 QUIT
+6 ;
TERM ;--set up the terminal variables
+1 NEW X
+2 SET X="IOSGRO;IOSTBM;IOCUU;IOSC;IORC;IOCUD;IOHOME;IOELALL;IORVON;IORVOFF;IOCUF;IONEL;IOBON;IOBOFF;IOUON;IOUOFF;IOELEOL;IOEDALL;IOEDEOP;IOCUB;IOECH;IOELBOL;IOIND"
+3 DO ENDR^%ZISS
DO GSET^%ZISS
+4 SET X="IOINLOW;IOINHI;IOINORM;IOCUOFF;IOCUON;IORI;IOIND;IORESET;IOCUOFF;IOCUON;IOSGR0"
+5 DO ENDR^%ZISS
+6 IF IOSTBM=""
SET IOSTBM=1
+7 QUIT
FULL ;--set terminal to full scrolling window
+1 NEW IOTM,IOBM,X
+2 KILL PXBWIN
+3 IF '$DATA(IOSTBM)
DO TERM
+4 IF IOSTBM]""
SET IOTM=1
SET IOBM=(IOSL-(1))
WRITE IOSC
WRITE @IOSTBM
WRITE IORC
+5 SET X=IOM
XECUTE ^%ZOSF("RM")
+6 QUIT
FULL0 ;--set terminal to full scrolling window
+1 NEW IOTM,IOBM,X
+2 IF '$DATA(IOSTBM)
DO TERM
+3 IF IOSTBM]""
SET IOTM=1
SET IOBM=IOSL
WRITE IOSC
WRITE @IOSTBM
WRITE IORC
+4 SET X=IOM
XECUTE ^%ZOSF("RM")
+5 QUIT
CLEAR1 ;--clean out all cursor control variables
+1 DO KILL^%ZISS
DO GKILL^%ZISS
+2 QUIT
UNDON ;--underline on
+1 IF '$DATA(IOUON)
DO TERM^PXBCC
+2 WRITE IOUON
+3 QUIT
UNDOFF ;--underline off
+1 IF '$DATA(IOUON)
DO TERM^PXBCC
+2 WRITE IOUOFF
+3 QUIT
REVCPT(LINE,PXRVON) ;--Reverse Video a particular CPT CODE,PROVIDER OR POV
+1 ;
+2 ; INPUT: LINE = Selection from PXBSAM array
+3 ; PXRVON = Flag to turn reverse video on/off
+4 ; where: 1 = reverse video on
+5 ; 0 = reverse video off
+6 ;
+7 if $GET(NOREV)=1
QUIT
+8 NEW ENTRY,XLINE,I,IOTM,IOBM,COL,DX,DY
+9 SET ENTRY=$GET(PXBSAM(LINE))
+10 ;Actual line on which CPT code displayed
+11 ;S XLINE=LINE#10+4
+12 ;PX*1.0*164
SET XLINE=PXBSAM(LINE,"LINE")#10+4
+13 IF XLINE<5
SET XLINE=XLINE+10
+14 IF '$DATA(IOSC)
DO TERM
+15 SET COL=4
+16 WRITE IOSC
SET IOTM=1
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IOHOME
DO ZERO
+17 FOR I=1:1:XLINE
WRITE IOCUD
+18 FOR I=1:1:COL
WRITE IOCUF
+19 SET DY=XLINE
SET DX=COL
DO DXDY
+20 IF $GET(PXRVON)
WRITE IORVON,$PIECE(^ICPT($PIECE(ENTRY,"^",1),0),U),IORVOFF
+21 IF '$GET(PXRVON)
WRITE IORVOFF,$PIECE(ENTRY,"^",1)
+22 SET IOTM=PXBSAVE
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IORC
+23 QUIT
REVPRV(LINE) ;--Reverse Video a particular CPT CODE,PROVIDER OR POV
+1 if $GET(NOREV)=1
QUIT
if $GET(FROM)["CPT"
QUIT
if $GET(FROM)["PL"
QUIT
+2 NEW ENTRY,XLINE,I,IOTM,IOBM,COL,DX,DY
+3 SET ENTRY=$GET(PXBSAM(LINE))
SET XLINE=(LINE#10)+4
+4 IF XLINE<5
SET XLINE=XLINE+10
+5 IF '$DATA(IOSC)
DO TERM
+6 SET COL=4
+7 WRITE IOSC
SET IOTM=1
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IOHOME
DO ZERO
+8 FOR I=1:1:XLINE
WRITE IOCUD
+9 FOR I=1:1:COL
WRITE IOCUF
+10 SET DY=XLINE
SET DX=COL
DO DXDY
+11 WRITE IORVON,$PIECE(ENTRY,"^",1),IORVOFF
+12 SET IOTM=PXBSAVE
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IORC
+13 QUIT
REVPOV(LINE) ;--Reverse Video a particular CPT CODE,PROVIDER OR POV
+1 if $GET(NOREV)=1
QUIT
+2 NEW ENTRY,XLINE,I,IOTM,IOBM,COL,DX,DY
+3 SET ENTRY=$GET(PXBSAM(LINE))
SET XLINE=(LINE*2-1#10)+4
+4 IF XLINE<5
SET XLINE=XLINE+10
+5 IF '$DATA(IOSC)
DO TERM
+6 SET COL=4
+7 WRITE IOSC
SET IOTM=1
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IOHOME
DO ZERO
+8 FOR I=1:1:XLINE
WRITE IOCUD
+9 FOR I=1:1:COL
WRITE IOCUF
+10 SET DY=XLINE
SET DX=COL
DO DXDY
+11 WRITE IORVON,$JUSTIFY($PIECE($PIECE(ENTRY,"^",1),".",1),4),".",$PIECE($PIECE(ENTRY,"^",1),".",2),IORVOFF
+12 SET IOTM=PXBSAVE
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IORC
+13 QUIT
REVSTP(LINE) ;--Reverse Video a particular CPT CODE,PROVIDER OR POV
+1 if $GET(NOREV)=1
QUIT
+2 NEW ENTRY,XLINE,I,IOTM,IOBM,COL,DX,DY
+3 SET ENTRY=$GET(PXBSAM(LINE))
SET XLINE=(LINE#10)+4
+4 IF XLINE<5
SET XLINE=XLINE+10
+5 IF '$DATA(IOSC)
DO TERM
+6 SET COL=4
+7 WRITE IOSC
SET IOTM=1
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IOHOME
DO ZERO
+8 FOR I=1:1:XLINE
WRITE IOCUD
+9 FOR I=1:1:COL
WRITE IOCUF
+10 SET DY=XLINE
SET DX=COL
DO DXDY
+11 WRITE IORVON,$PIECE(ENTRY,"^",1),IORVOFF
+12 SET IOTM=PXBSAVE
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IORC
+13 QUIT
+14 ;
UREV(LINE) ;--Reverse Video a particular CPT CODE,PROVIDER OR POV
+1 QUIT
+2 ;--**OUT OF ORDER
+3 NEW ENTRY,XLINE,I,IOTM,IOBM,DX,DY
+4 SET ENTRY=$GET(PXBSAM(LINE))
SET XLINE=LINE+4
+5 IF '$DATA(IOSC)
DO TERM
+6 WRITE IOSC
SET IOTM=1
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IOHOME
DO ZERO
+7 FOR I=1:1:XLINE
WRITE IOCUD
+8 FOR I=1:1:4
WRITE IOCUF
+9 SET DY=XLINE
SET DX=COL
DO DXDY
+10 WRITE $PIECE(ENTRY,"^",1)
+11 SET IOTM=PXBSAVE
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IORC
+12 QUIT
+13 ;
RREV(LINE,COLUMN,ENTRY) ;--Reverse REQUESTED information
+1 if $GET(NOREV)=1
QUIT
+2 NEW XLINE,I,IOTM,IOBM,DX,DY
+3 SET XLINE=LINE+1
+4 IF '$DATA(IOSC)
DO TERM
+5 WRITE IOSC
SET IOTM=1
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IOHOME
DO ZERO
+6 FOR I=1:1:XLINE
WRITE IOCUD
+7 FOR I=1:1:COLUMN
WRITE IOCUF
+8 SET DY=XLINE
SET DX=COLUMN
DO DXDY
+9 WRITE IOELEOL,IOINHI,ENTRY,IOINLOW
+10 SET IOTM=PXBSAVE
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IORC
+11 QUIT
RREVST(LINE,COLUMN,ENTRY) ;--Reverse REQUESTED information
+1 if $GET(NOREV)=1
QUIT
+2 NEW XLINE,I,IOTM,IOBM,DX,DY
+3 SET XLINE=LINE+1
+4 IF '$DATA(IOSC)
DO TERM
+5 WRITE IOSC
SET IOTM=1
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IOHOME
DO ZERO
+6 FOR I=1:1:XLINE
WRITE IOCUD
+7 FOR I=1:1:COLUMN
WRITE IOCUF
+8 SET DY=XLINE
SET DX=COLUMN
DO DXDY
+9 WRITE IORVON,ENTRY,IORVOFF
+10 SET IOTM=PXBSAVE
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IORC
+11 QUIT
RREVH(LINE,COLUMN,ENTRY) ;--Reverse REQUESTED information
+1 if $GET(NOREV)=1
QUIT
+2 NEW XLINE,I,IOTM,IOBM,DX,DY
+3 SET XLINE=LINE+1
+4 IF '$DATA(IOSC)
DO TERM
+5 WRITE IOSC
SET IOTM=1
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IOHOME
DO ZERO
+6 FOR I=1:1:XLINE
WRITE IOCUD
+7 FOR I=1:1:COLUMN
WRITE IOCUF
+8 SET DY=XLINE
SET DX=COLUMN
DO DXDY
+9 WRITE IOELEOL,IOINHI,IOUON,ENTRY,IOINLOW,IOUON
FOR I=1:1:5
WRITE " "
+10 WRITE IOUOFF
+11 SET IOTM=PXBSAVE
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IORC
+12 QUIT
LOC(LINE,COLUMN) ;--Locate Cursor to specified position
+1 NEW PXBOS
+2 SET PXBOS=^%ZOSF("OS")
+3 IF PXBOS'["MSM"
NEW DY,DX
SET DY=LINE
SET DX=COLUMN
XECUTE IOXY
XECUTE ^%ZOSF("XY")
QUIT
+4 NEW XLINE,I,IOTM,IOBM,DX,DY
+5 WRITE IOCUOFF
+6 IF '$DATA(IOSTBM)
DO TERM
+7 SET IOTM=1
SET IOBM=IOSL
WRITE @IOSTBM
WRITE IOHOME
DO ZERO
+8 IF $DATA(LINE)
FOR I=1:1:LINE
WRITE IOIND
+9 FOR I=1:1:COLUMN
WRITE IOCUF
+10 IF $DATA(LINE)
SET DY=LINE
+11 IF '$TEST
SET DY=$Y
+12 SET DX=COLUMN
DO DXDY
+13 WRITE IOCUON
+14 QUIT
+15 ;
ERASE ;---ERASE THE LIST GOING UPWARDS
+1 NEW PXI
+2 IF '$DATA(IOCUU)
DO TERM^PXBCC
+3 DO LOC^PXBCC(15,1)
+4 SET PXI=0
FOR I=1:1:11
WRITE IORI,IOELALL
+5 QUIT