Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 2417

8-bit acorn software: other • Re: Using Treecopy with ROM filing system

$
0
0
This might work:

Code:

   10 REM > ROMToDisk   20 :   30 src$="ROM"   40 dest$="DISK"   50 IFPAGE<&E00:PRINT"Must run in I/O processor":END   60 max%=HIMEM-LOMEM-400:DIM mem% max%:last$=""   70 REPEAT   80   OSCLI src$   90   REPEAT  100     in%=OPENIN("")  110     ?&3BE=13:fn$=$&3B2+CHR$0:fn$=LEFT$(fn$,INSTR(fn$,CHR$0)-1)  120     IF last$<>"":CLOSE#in%  130   UNTIL last$="" OR fn$=last$  140   in%=OPENIN("")  150   ?&3BE=13:fn$=$&3B2+CHR$0:fn$=LEFT$(fn$,INSTR(fn$,CHR$0)-1)  160   len%=0:ld%=!&3BE:ex%=!&3C2  170   PRINT fn$,~ld%,~ex%;  180   REPEAT IFNOTEOF#in%:mem%?len%=BGET#in%:len%=len%+1  190   UNTIL EOF#in%ORlen%>max%:CLOSE#in%:PRINT~len%;:OSCLI dest$  200   A%=MID$(fn$,2,1)=".":fn$=LEFT$(fn$,7-2*A%)  210   IFlen%<max%:OSCLI"SAVE "+fn$+" "+STR$~mem%+"+"+STR$~len%+" "+STR$~ex%+" "+STR$~ld% ELSE PRINT'"File too long for buffer";  220   PRINT  230 UNTIL FALSE
I might be able to tweek it to be ROM/TAPE agnostic.

Statistics: Posted by jgharston — Sat Jun 08, 2024 1:23 am



Viewing all articles
Browse latest Browse all 2417

Trending Articles