[Coco] Assembly help: Corrupted bin file ?
Darren A
mechacoco at gmail.com
Wed Dec 17 11:07:37 EST 2008
On 12/17/08, Fedor Steeman wrote:
>> FF 00 00 xx xx
>> where xx xx is the execute address.
>>
>
> I notice the binary starts with 00 00 24 21 ... wheren 24 21 is the
> execution address. Should the binary really start with FF 00 00 24 21 ? Is
> this a bug in the assembler or did I forget to set an option?
The first 5 bytes are correct the way they are. The first byte is zero
indicating that it is not the end-of-file segment. The next two bytes
(00 24) indicate the size of your code and the last two bytes (21 FD)
specifiy the address where the code should be loaded.
Following the 5 byte header is your code. Another 5 byte postamble
needs to be added to the end of the file. It should be:
FF 00 00 21 FD
The FF bytes indicates end-of-file. The two zero bytes are ignored and
the last two bytes (21 FD) are the execution address.
Darren
More information about the Coco
mailing list