.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,DOIT IOIN: .WORD 0,0 IOOUT: .WORD 0,0 ;I/O STAT BLKS EOFFLG: .WORD 0 ;COUNTER OF EOF CHARS ;START AT "DOIT" FOR 1600BPI OUT, OR "TCPY" TO LEAVE DENSITY AS IS ;(USE DGT TO SET UP VIA 'A' COMMAND.)_ ; DOIT: .IF DF,DO1600 QIOW$S #IO.STC,#INLUN,#1,,,,<#4000> ; SET TO 1600 BPI .ENDC 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 BR TCPY DOEOF: QIOW$S #IO.EOF,#2,#2,,#IOOUT INC EOFFLG ;COUNT EOFS CONSECUTIVE CMP EOFFLG,#2 BLT TCPY LOSE: EXIT$S .END DOIT