[Coco] Exec address of disk loaded ml program?

L. Curtis Boyle curtisboyle at sasktel.net
Tue Apr 10 15:18:45 EDT 2007


On Tue, 10 Apr 2007 13:09:22 -0600, Fedor Steeman <petrander at gmail.com>  
wrote:

> Right, thanks! So at least that is the same as on a cassette-only  
> system...
> But I guess on a disk system, there is no easy way of figuring out the  
> start
> and end addresses? Unless you use a hex editor to look at the virtual  
> disk?
>

It's done differently. You can have multiple, non-contiguous segments in a  
disk file (well, with some trickery, you can do that on cassette, too).  
Basically, you will have a 5 byte header to each "block" in the file, of  
which there are two types:

Preamble block (will contain regular data)
$00 - marks as preamble block
$xxxx - Length of block in bytes
$yyyy - start address in RAM to put block

followed by $xxxx bytes of data.
At his point, you can either get more $00 preamble blocks, or you can get  
a postamble block:
$FF - marks as postamble block
$0000 - unused, usually set to $0000
$zzzz - EXEC address


L. Curtis Boyle



More information about the Coco mailing list