MediaWiki:Sitenotice:
2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues. 2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)

Binary file: Difference between revisions

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
No edit summary
(rewrite)
Line 1: Line 1:


A CoCo '''binary file''' can contain sheer data or one or more executable machine language programs. They can be loaded into memory using the LOADM or CLOADM commands. Included in the format is the load address of the binary as well as an execution address. They may contain multiple loadable sections, each of which has its own load address.
A CoCo '''binary file''' can contain sheer data or one or more executable machine language programs. They can be loaded into memory from disk using the LOADM command or from tape using the CLOADM command. Included in the format is the load address of the binary as well as an execution address. They may contain multiple loadable sections each having its own load address. A section starts with a five bytes long preamble of which the first byte is $00. The following two bytes specify the length of the data block to be loaded and the last two bytes specify the start address in RAM the data block is to be loaded at. This so-called '''preamble''' is followed by the actual bytes comprising ML code and/or any data. The data block can be followed by another preamble to a new section with more data/code or terminated with a postamble. The postamble is also five bytes in length, with the first one being $FF, the next two being $00, and the last two forming the execution address for the ML program in the binary file, if any.
Each section starts with a preamble that is five bytes long. The first byte is zero. The next two bytes specify the number of bytes to load and the last two bytes specify the address to load the bytes at. Then, a string of bytes follows containing the program and/or any data. After this there may be another preamble followed by more data/code or a postamble. The postamble is also five bytes in length. The first byte of the postamble is $FF, the next two are zero, and the last two form the execution address for the binary section.


{| class="wikitable"
{| class="wikitable"

Revision as of 10:21, 8 May 2013

A CoCo binary file can contain sheer data or one or more executable machine language programs. They can be loaded into memory from disk using the LOADM command or from tape using the CLOADM command. Included in the format is the load address of the binary as well as an execution address. They may contain multiple loadable sections each having its own load address. A section starts with a five bytes long preamble of which the first byte is $00. The following two bytes specify the length of the data block to be loaded and the last two bytes specify the start address in RAM the data block is to be loaded at. This so-called preamble is followed by the actual bytes comprising ML code and/or any data. The data block can be followed by another preamble to a new section with more data/code or terminated with a postamble. The postamble is also five bytes in length, with the first one being $FF, the next two being $00, and the last two forming the execution address for the ML program in the binary file, if any.

contents length meaning
$00 8 bit marker
16 bit length
16 bit start address
variable data/code
$FF 00 00 24 bit marker
16 bit exec address