<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 14 Jun 2010 15:02:41 GMT
From   : jgh@... (J.G.Harston)
Subject: Tape to Disc Transfer

walker_matt wrote:
> Anybody out there know how to transfer stuff from tape to disc?
> I can do it with BASIC programs, using;
> 
> *TAPE
> LOAD "WHATEVER"
> *DISC
> SAVE "WHATEVER"
> 
> But how can I move a machine code program, I need either some software that
> can do it for me, or a way of finding out all the start and end addresses. 

I posted code to do this last September at
http://mdfs.net/Archive/BBCMicro/2009/09/15/230911.htm

Google doesn't seem to be able to find it, so I'll repost it here:

The following peeks at the CFS workspace to find the last loaded
filename and address information. 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 >>