The 9 bytes after the sync byte describe the file. The file name and the data follow. Offsets are from the first header byte.
Layout
| Offset | Size | Name | Description |
|---|---|---|---|
0 | 2 | Reserved | Not used by the loader. |
2 | 1 | Type | 00 BASIC program, 80 machine code. |
3 | 1 | Autorun | 00 load only; non-zero: run after loading. |
4 | 2 | End address | The address after the last data byte, high byte first. |
6 | 2 | Start address | The address of the first data byte, high byte first. |
8 | 1 | Reserved | Not used by the loader. |
Reserved bytes
Three bytes the loader does not use: two at the start and one after the start address. On the real
tape checked here the first file (written by BASIC) has FF FF and FF, and the
four machine-code files after it have 00 00 and 00. The explorer shows them as they are and does not require a value.
Type
| Value | Meaning |
|---|---|
00 | A BASIC program: the data is a chain of tokenised lines, normally at 0501. |
80 | Machine code or data: the bytes go to the start address and are 6502 instructions or data. |
No other value is documented here. The explorer names another value as “not a BASIC program or machine code” and shows its data as code.
Autorun
Zero means the file is only loaded. A non-zero value means it starts after loading: a BASIC
program is run, machine code is called at its start address. Both 80 and
C7 are seen (the real tape has C7 on a BASIC program and on machine
code); this page does not know that the value means more than non-zero.
End and start address
Both are 16-bit, stored with the high byte first, the opposite of the
processor’s own order: the bytes 05 14 are the address $0514. The data
is placed in memory from the start address, and its length is the end address minus the start
address: the end address is the address after the last byte. See
the data page for how that was checked. An
end address below the start address is an error, and the explorer reports it.
A BASIC program from an Oric starts at $0501. Machine code can go anywhere in RAM, below
the screen and the character sets (see memory and hardware).
Example
00000000 16 16 16 24 FF FF 00 C7 05 14 05 01 FF 42 4F 4F ...$.........BOO
00000010 54 00 T.
BOOT.Reading it: reserved FF FF; type 00, BASIC; autorun C7, so it
runs; end address 0514; start address 0501; a reserved FF. The
data is 19 bytes ($0514 − $0501): the program 10 CLOAD"", 20 GOTO 10.