[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tools for BAS to WAV?
- Subject: Re: Tools for BAS to WAV?
- From: lyricalnanoha@dosius.ath.cx (Steve Nickolas)
- Date: Sun, 4 Jul 2010 14:43:05 +0000 (UTC)
- Newsgroups: comp.sys.apple2
- Organization: Mac GUI
- References: <4c3097b2$0$7662$9b4e6d93@newsspool1.arcor-online.net>
- User-agent: Mac GUI City Usenet Posting
- Xref: g2news1.google.com comp.sys.apple2:16865
Linards Ticmanis wrote:
>> the cassette LOAD routine does the following:
>>
>> - read 3-byte header from tape (program length + lock flag)
>> - store program end address at $69/6A
>> - store lock byte at $D6
>> - load program from tape
>> - if locked, start running, otherwise jump to "FIX.LINKS" routine
>
> No more details though. I assume "FIX.LINKS" repairs the pointer to the
> next line that precede every tokenized line of BASIC code. The function
> would be to allow for relocating BASIC code for different RAM size
> machines, especially important for Integer BASIC, which stores lines
> from HIMEM downward rather then from LOMEM upward.
>
> Probably you wouldn't want this to happen with your code, so you'd set
> the lock byte to "true" (whatever that value is).
>
Hm.
The "lock byte" is the byte that makes every command equivalent to RUN. A
NEW will set it to 0. True is "Minus" (it's always compared with a BPL), so
128-255 are considered true.
For Applesoft BASIC (the wrapper I use is specifically Applesoft) it's
usually a safe bet the code will remain sitting at $0801, an assumption my
code and that of Exomizer relies on.
Looks like it reads 3 bytes at $50, with $50 being a word containing the
length of the file in low endian (well, it *is* a 6502), and $52 being the
LOCK byte. If I set this to HIGH, it may be possible to initiate the
process with only one command (LOAD).
-uso.