<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 15 Sep 2009 23:09:11 +0100
From   : jgh@... (Jonathan Graham Harston)
Subject: Basic tape files to disc - quick and dirty method?

"Neil F" wrote:
> Unfortunately I don't have any tape-to-disc software handy. Is there a
> simple REPEAT-UNTIL loop I can use to replicate picking them off
> sequentially and dumping them to a waiting disc in the drive? Sort of
 
I seem to remember something like the following, it peeks at the
CFS workspace to find the last loaded filename. Careful with the
wordwrapped line at the end.
 
REM > TapeToDisk
REM Must run in I/O processor
:
max%=HIMEM-LOMEM-400:DIM mem% max%
REPEAT:*TAPE
in%=OPENIN(""):len%=0
REPEATIFNOTEOF#in%:mem%?len%=BGET#in%:len%=len%+1
UNTILEOF#in% OR len%>max%:CLOSE#in%:in%=0
ld%=!&3BE:ex%=!&3C2
?&3BE=13:fn$=$&3B2+CHR$0:fn$=LEFT$(fn$,INSTR(fn$,CHR$0)-1)
*DISK
IFlen%<=max%:OSCLI"SAVE "+fn$+" "+STR$~mem%+"+"+STR$~len%+" "+STR$~ex%+"
"+STR$~ld% ELSE PRINT"File too long for buffer"
UNTIL0
 
-- 
J.G.Harston - jgh@...                - mdfs.net/User/JGH
Whitby Yards Gazetteer - http://mdfs.net/Docs/Books/YofWhitby/Gazetteer
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>