.TITLE TCPY .IDENT /GCE000/ ;TAPE COPY FROM LUN 1 TO LUN 2, IMAGEMODE WITH ;BIG BUFFERS. ALLOCATE 1 BUFFER OF HUGE SIZE AND ;BOUNCE DATA THROUGH IT. IGNORE ERRORS. BUFFR: .BLKW 15000. ;SUITABLY GIANT BUFFER ;NO TAPE POSITIONING FIRST...USE TPP TO DO THAT. .MCALL EXIT$S,QIOW$S .GLOBL TCPY ERR: .ASCII <15><12><7><7>/*** ERROR ***/ .ASCII / TAPE WRITE PROTECTED. TCPY ABORTED./<15><12> ERRE=.-ERR .EVEN IOIN: .WORD 0,0 IOOUT: .WORD 0,0 ;I/O STAT BLKS EOFFLG: .WORD 0 ;COUNTER OF EOF CHARS TCPY: QIOW$S #IO.RLB,#1,#1,,#IOIN,,<#BUFFR,#30000.>;READ A RECORD BCS LOSE ;LOSE IF NO DRIVER ;IOIN = BYTES SEEN ;CHECK FOR EOF, AND IF SEEN, COUNT IT AND WRITE TO OUTPUT TAPE. ;OTHERWISE WRITE DATA OUT. ON 2ND EOF, EXIT. .MACRO ETST ERR CMPB IOIN,#ERR BEQ DOEOF .ENDM ETST IE.EOF ;1 ENDFILE SEEN ETST IE.EOV ;END OF VOLUME (2 EOF ON TAPE) SEEN ETST IE.EOT ;END OF TAPE SEEN CMPB IOIN,#IE.PRI BNE 1$ EXIT$S 1$: CLR EOFFLG ;SAY GOT DATA MOV IOIN+2,R0 ;GET BYTES READ IN QIOW$S #IO.WLB,#2,#2,,#IOOUT,,<#BUFFR,R0> ;WRITE WHAT WE READ CMPB IOOUT,#IE.WLK BEQ ERROUT BR TCPY DOEOF: QIOW$S #IO.EOF,#2,#2,,#IOOUT INC EOFFLG ;COUNT EOFS CONSECUTIVE CMP EOFFLG,#2 BLT TCPY BR LOSE ERROUT: QIOW$S #IO.WVB,#5,#3,,,,<#ERR,#ERRE,#40> LOSE: EXIT$S .END TCPY