MACRO 00001000 &LABEL WRTAPE &BUFFER,&LENGTH,&ADDR,&MODE=,&ERROR=*+4 00002000 GBLC &DMSMODE 00003000 LCLC &BUF,&LEN,&TAPE 00004000 CNOP 0,4 00005000 &LABEL DS 0H 00006000 AIF (T'&BUFFER EQ 'O').ERR1 00007000 AIF (T'&LENGTH EQ 'O').ERR2 00008000 &BUF SETC '&BUFFER' 00009000 AIF ('&BUFFER'(1,1) NE '(').SKIP1 00010000 &BUF SETC '0' 00011000 STCM &BUFFER(1),7,DMS&SYSNDX.A+1 00012000 .SKIP1 ANOP 00013000 &LEN SETC '&LENGTH' 00014000 AIF ('&LENGTH'(1,1) NE '(').SKIP2 00015000 &LEN SETC '0' 00016000 ST &LENGTH(1),DMS&SYSNDX.B 00017000 .SKIP2 ANOP 00018000 &TAPE SETC 'TAP1' 00019000 AIF (T'&ADDR EQ 'O').NOAD 00020000 AIF ('&ADDR'(1,3) NE 'TAP').NTAP 00021000 AIF (K'&ADDR NE 4).ERR3 00022000 AIF ('&ADDR'(4,1) LT '1' OR '&ADDR'(4,1) GT '4').ERR3 00023000 &TAPE SETC '&ADDR' 00024000 AGO .NOAD 00025000 .NTAP ANOP 00026000 AIF (K'&ADDR NE 3).ERR3 00027000 AIF ('&ADDR'(1,3) EQ 'TAP').NOAD 00028000 &TAPE SETC '0&ADDR' 00029000 .NOAD ANOP 00030000 &DMSMODE SETC '0' 00031000 AIF (T'&MODE(1) NE 'O').YESMS @VA05521 00031300 AIF (T'&MODE(2) NE 'O').YESMS @VA05521 00031600 AIF (T'&MODE(3) NE 'O').YESMS @VA05521 00031900 AGO .NOMS @VA05521 00032200 .YESMS ANOP 00032500 DMSTMS &MODE(1),&MODE(2),&MODE(3) 00033000 .NOMS ANOP 00034000 BAL 1,DMS&SYSNDX.D 00035000 DC CL8'TAPEIO' 00036000 DC CL8'WRITE' 00037000 DC CL4'&TAPE' 00038000 DMS&SYSNDX.A DC BL1'&DMSMODE',AL3(&BUF) 00039000 DMS&SYSNDX.B DC F'&LEN' 00040000 DMS&SYSNDX.C DC F'0' 00041000 DMS&SYSNDX.D SVC 202 00042000 DC AL4(&ERROR) 00043000 MEXIT 00044000 .ERR1 MNOTE 8,'BUFFER ADDRESS NOT SPECIFIED' 00045000 MEXIT 00046000 .ERR2 MNOTE 8,'LENGTH PARAMETER NOT SPECIFIED' 00047000 MEXIT 00048000 .ERR3 MNOTE 8,'INVALID DEVICE ADDRESS SPECIFIED' 00049000 MEND 00050000