Date : Wed, 16 Sep 2009 18:32:57 +0100
From : faz@... (Neil F)
Subject: Basic tape files to disc - quick and dirty method?
Jonathan Graham Harston wrote:
>> Message-ID: <F3355AD1FC7845E58A98CFFAA83FEF01@...>
>
> "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
Thanks for that, Jonathan. Seems to be working well.
-Neil.
--