These kind
of file can be sometimes found on DOS disk. They are like DOS file as
they contain the information bytes for the sector chaining (Byte
per Sector and Next Sector), but they don't have data block
or segment and they don't have the standard $FF $FF header, but they
have a BOOT program header.
In the
fisrt sector we can find the BOOT sector structure with the chaining
sector information bytes.
BYT#>00
01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |
CHAR>
|
0123456789ABCDEF |
00
: 00 54 00 3E 70 3F 00 00 00 00 00
00 00 00 00 00
10 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70 : 00 00 00 00 00 00 00 00 00 00 00 00 00 04
93 7D
|
|
................
................
................
................
................
................
................
...............}
|
Checksum
= $22, Next sector = $093, Bytes per sector = $7D |
The 6
first bytes of the sector give the following information:
00
54 : these 2 bytes clearly show that this is not a standard
Atari binary DOS file, because this header is different than $FF
$FF. This is then some boot data code converted into data file.
The loading procedure is as following.
All the
data will be loaded and stored in memory from the $3E00 Atari
memory address (given by the byte #2 and byte #3), as for a boot program.
The last 3 bytes of the sector are not included in the data to be
stored in memory, because they are used for the sector chaining: the
next sector to load and the byte of data number per sector. But the
6 first bytes are data to be stored, and they will be stored in
the memory at the loading address.
The 2 first
bytes are not used for the boot file loading (byte #0 and #1).
The byte
#4 and #5, which give the $3F70 address in our example, set the
DOSINI (and CASINI) Atari vectors.
Once loaded
into memory, the
loading file utility program runs the instruction JSR
(storing address value + 6) i.e. JSR $3E06 in our exemple.
If a RTS
instruction is executed, then the
loading file utility program runs the JSR
(DOSINI)
instruction,
i.e. JSR $3F70 in our exemple.
If a RTS
instruction is executed again, then the
loading file utility program runs the
JMP (DOSVEC)
instruction.
The DOSVEC Atari vector must then be set in the executed file
code (this is usually done in the DOSINI subroutine, in the instruction
code following the $3E06 address generally).