MACRO 00001000
&LAB DISPW &BUFAD,&LINE=0,&BYTES=1760,&ERASE=,&CANCEL= 00002000
SPACE 1 00003000
&LAB DS 0H 00004000
AIF ('&CANCEL' EQ '').SK0 00005000
AIF ('&CANCEL' NE 'YES').ERR5 00006000
OI FLAG&SYSNDX,X'02' SET CANCEL FLAG 00007000
.SK0 AIF (T'&BUFAD EQ 'O').ERR1 00008000
AIF (&LINE GT 23).ERR2 00009000
AIF (&BYTES GT 1760).ERR3 00010000
AIF ('&ERASE' EQ '').SK1 00011000
AIF ('&ERASE' NE 'YES').ERR4 00012000
OI FLAG&SYSNDX,X'01' SET ERASE FLAG 00013000
.SK1 LA 1,&BUFAD GET BUFFER ADDRESS 00014000
ST 1,ADR&SYSNDX AND PUT IT IN LIST 00015000
B SKIP&SYSNDX BR AROUND CONSTANTS 00016000
RG13&SYSNDX DC 1F'0' REG 13 IS SAFE HERE 00016510
LINE&SYSNDX DC H'&LINE' 00017000
NUMB&SYSNDX DC H'&BYTES' 00018000
ADR&SYSNDX DC A(0) 00019000
DC A(LINE&SYSNDX) 00020000
DC A(NUMB&SYSNDX) 00021000
DC A(FLAG&SYSNDX) FLAG FOR GIO 00022000
FLAG&SYSNDX DC X'00' 00023000
DS 0H 00024000
SKIP&SYSNDX LA 1,ADR&SYSNDX POINT TO LIST 00025000
L 15,=V(DMSGIO) 00026000
ST 13,RG13&SYSNDX SAVE REG 13 00026050
SR 13,13 SO DMSGIO WON'T USE EDCB VA05027 00026100
BALR 14,15 DO I/O 00027000
L 13,RG13&SYSNDX RESTORE REG 13 00027500
MEXIT 00028000
.ERR1 MNOTE 8,'BUFFER ADDRESS NOT SPECIFIED' 00029000
MEXIT 00030000
.ERR2 MNOTE 8,'INVALID LINE NUMBER SPECIFIED' 00031000
MEXIT 00032000
.ERR3 MNOTE 8,'INVALID BYTE COUNT SPECIFIED' 00033000
MEXIT 00034000
.ERR4 MNOTE 8,'INVALID ERASE PARAMETER SPECIFIED' 00035000
MEXIT 00036000
.ERR5 MNOTE 8,'INVALID CANCEL PARAMETER SPECIFIED' 00037000
MEND 00038000