Hi!
I've got some assemlby that loads the LOAD"$" equivalent into a part of memory, from which I now want to interpret the data.
Filename and blocksize is recognizable, but the rest of the data is not clear what it means. Nor how they files are seperated. It seems to be a $0 but, not always. I've included a screenshot of the debug window with the memory starting at $0811
I'm not able to find the specifications on the internet.
Can anyone help?
Format of LOAD"$" data
- desertfish
- Posts: 1123
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Re: Format of LOAD"$" data
The format is identical to a BASIC program. Line numbers are the block counts, and every line ends with 0 byte. I also think there's some pointer bytes that you can skip which are used in BASIC to point to the next line or something.
Anyway if you search around for how BASIC programs are stored in memory you're off to the races with this too
Anyway if you search around for how BASIC programs are stored in memory you're off to the races with this too
Re: Format of LOAD"$" data
Somewhere in here, I have a BASIC program that reads a directory.
The general format for each line is something like:
The general format for each line is something like:
- 2 bytes: throw away
- 2 bytes: line number (file size) in blocks. (1 block is 254 bytes)
- some spaces
- quote
- filename
- quote
- some spaces
- PRG
- zero
- read and discard 2 bytes
- read 2 bytes and convert to integer
- read text to byte 0