TY%=0% & \ DENSITY%=256% IF TEMP%=0% OR TEMP%=1600% & \ DENSITY%=12% IF TEMP%=800% & \ GOTO 125 IF DENSITY%=0% & \ INPUT "Number of copies <1>"; COPIES% IF NOT SAME.TAPE% & \ GOTO 200 IF RECOVER% & \ PRINT "[Copying source tape to disk]" & ! See if we are using more than one reel of tape. See what density & ! to use for the output. If using more than one reel of tape, see & ! how many copies we need. Skip reading the input tape on a recovery. & 130 GET #TAPCHN% & \ RECLEN%=RECOUNT 140 PRINT #LENCHN%, RECLEN% & \ PUT #DATCHN%+SWAP%(TAPCHN%), COUNT INT((RECLEN%+511%)/512%)*512% & \ EOF%=0% & \ GOTO 130 & ! Get the next record from the tape (EOF goes to 30000). & ! Record the length. Store the data in the temp file using & ! block I/O. Reset the "just read an EOF" flag. Repeat until & ! two EOFs read in a row (EOT). & 200 COPIES%=1% IF COPIES%<=0% & \ FOR COPY.LOOP%=1% TO COPIES% & \ IF NOT SAME.TAPE% THEN & PRINT BELL$; IF COPY.LOOP%>1% & \ PRINT "Mount the "; & \ PRINT "next "; IF COPY.LOOP%>1% & \ PRINT "tape to copy TO and press RETURN"; & \ INPUT LINE Z$ 210 CLOSE LENCHN%, DATCHN% & \ OPEN DEVICE$+"TAPREC.TMP/RO" FOR INPUT AS FILE LENCHN% & \ OPEN DEVICE$+"TAPDAT.TMP/RO" FOR INPUT AS FILE DATCHN%, & RECORDSIZE 2% OR NOT(32767%) & \ Z%=MAGTAPE(6%,DENSITY%,TAPCHN%) & \ PRINT "[Creating output tape]" 220 INPUT #LENCHN%, RECLEN% & \ GOTO 240 IF RECLEN%=-2% & \ IF RECLEN%=-1% THEN & Z%=MAGTAPE(2%,0%,TAPCHN%) & ELSE & GET #DATCHN%+SWAP%(TAPCHN%), & COUNT INT((RECLEN%+511%)/512%)*512% & \ PUT #TAPCHN%, COUNT RECLEN% 230 GOTO 220 240 Z%=MAGTAPE(2%,0%,TAPCHN%) & \ Z%=MAGTAPE(1%,0%,TAPCHN%) & \ NEXT COPY.LOOP% & \ PRINT BELL$; "Finished" & \ PRINT & \ GOTO 100 & ! All errors are fatal now. For each record originally read & ! from tape... Get the record length. If EOT flag (-2), then & ! finish this tape and do the next one, if any. If EOF flag & ! (-1) then write an EOF, else get the stored data and write & ! it. After writing all records, write third EOF and & ! rewind/offline the tape. Repeat for any additional copies of & ! the tape. Kill our temp files and we're done. & 30000 ! ERROR TRAPPING & 30010 IF (ERR=11% AND ERL=100%) OR ERR=28% THEN & CLOSE TAPCHN%, LENCHN%, DATCHN% & \ KILL DEVICE$+"TAPREC.TMP" & \ KILL DEVICE$+"TAPDAT.TMP" & \ GOTO 32767 & ! If ^Z or ^C, kill our temp files and exit. & 30020 IF ERR=11% AND EOF%=0% THEN & EOF%=-1% & \ PRINT #LENCHN%, -1% & \ RESUME 130 & ! EOF while reading magtape: & ! If the last record was not also an EOF, write an "EOF read" & ! flag to the record length file and count it as a record. & 30030 IF ERR=11% THEN & PRINT #LENCHN%, -2% & \ Z%=MAGTAPE(3%,0%,TAPCHN%) & \ Z%=MAGTAPE(1%,0%,TAPCHN%) IF NOT SAME.TAPE% & \ RESUME 200 & ! End of tape (EOT) detected by at least two tape marks. & ! Record the EOT point in the record length file. Rewind or & ! Rewind/offline the tape. Change tape density. Continue & ! with second half of copy operation. & 30040 !IF ERR=13% THEN! & RECLEN%=RECOUNT & \ PRINT "%"; BELL$; BELL$; BELL$; & "Data error reading tape. Continuing..." & \ RESUME 140 & ! DATA ERROR ON DEVICE: & ! Print a warning message but continue on as if nothing & ! happened. & 30050 ON ERROR GOTO 0 & ! Any other error is fatal. & 32767 END TAPCOPBAS[.050010]TAPCOP.BAS[.050010]   X14|H [4;Ik(&'( k ߫H&P` \RrPP2PPzPP{PPPPP2P~\$\\TD 0D \~ hi) +\ ^( n ^( np\^txY\^ˀ\!kVk<\F˰<˴ˬ\VVkˤ1`@lP ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789<@<SЬTЬ UQS>