10
20 :
30 src$="TAPE"
40 dest$="DISK"
50 IF PAGE<&E00:PRINT"Must run in I/O processor":END
60 max%=HIMEM-LOMEM-400:DIM mem% max%
70 REPEAT:OSCLI src$
80 in%=OPENIN(""):PROCfn
90 len%=0:ld%=!&3BE:ex%=!&3C2
100 PRINT fn$,~ld%,~ex%;
110 REPEAT IF NOT EOF#in%:mem%?len%=BGET#in%:len%=len%+1
120 UNTIL EOF#in% OR len%>max%:CLOSE#in%:PRINT~len%;:OSCLI dest$
130 A%=MID$(fn$,2,1)=".":fn$=LEFT$(fn$,7-2*A%)
140 IF len%<max%:OSCLI"SAVE "+fn$+" "+STR$~mem%+"+"+STR$~len%+" "+STR$~ex%+" "+STR$~ld% ELSE PRINT'"File too long for buffer";
150 PRINT:UNTIL FALSE
160 DEFPROCfn:?&3BE=13:fn$=$&3B2+CHR$0:fn$=LEFT$(fn$,INSTR(fn$,CHR$0)-1):ENDPROC