[Coco] binary file format (CLOADM/LOADM)

Bob Devries devries.bob at gmail.com
Wed Apr 8 22:14:53 EDT 2009


When EdtASM+ creates a binary file during assembly, it makes the block size 
128 ($80) bytes each. EdtASM seems not to be able to create a contiguous 
file. So for every 128 byte block, there's 5 bytes overhead.

--
Regards, Bob Devries, Dalby, Queensland, Australia

Isaiah 50:4 The sovereign Lord has given me
the capacity to be his spokesman,
so that I know how to help the weary.

website: http://www.home.gil.com.au/~bdevasl
my blog: http://bdevries.invigorated.org/

----- Original Message ----- 
From: "Robert Gault" <robert.gault at worldnet.att.net>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Thursday, April 09, 2009 11:42 AM
Subject: Re: [Coco] binary file format (CLOADM/LOADM)


> Allen Huffman wrote:
>> Can someone summarize the byte sequence used by binary files -- or point 
>> me to the specs? Like, what is the header, and how do you specify the ORG 
>> address where data loads, for a BIN file?
>>
>
> The disk file structure separates each block of code with instructions for 
> the DOS on where to load the block and the size of the block. These 
> separators referred to in the "Unravelled" series as preambles and 
> postambles have the following structures.
>
> byte          preamble                    postamble
>  0             $00 flag                   $FF  flag
> 1,2            length of block            $0000
> 3,4            load address               EXEC address
>
> Typically the data blocks are 256 byte blocks or the ml program is a 
> single block the size of the program. It depends on how it was assembled 
> and the number of ORG statements in the source code.
>
> Tape files have a slightly different format.
> 1) A leader of 128 bytes of $%%
> 2) Namefile block
> 3) 0.5 sec blank
> 4) 128 bytes $55
> 5) data blocks
> 6) end of file block
>
> Block headers
> 1) $55
> 2) $3C sync byte
> 3) block type; name=0, data=1, EOF=$FF
> 4) block length byte; value 0-255
> 5) data; 0-255 bytes
> 6) checksum
> 7) $55
>
> Namefile block 15 bytes of data
> 1) 8 bytes for name
> 2) file type byte; Basic=0, data=1, ML=2
> 3) ascii flag; binary=0, ascii=$FF
> 4) gap flag byte; continuous=1, gaps=$FF  - this byte may not be used
> 5) 2 bytes; start address
> 6) 2 bytes; load address
>
> EOF block
> No data bytes
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco 




More information about the Coco mailing list