The Boot sector
GeneralDesign
Boot sector Structure
Offset | Len | Description |
0000 | 3 | jmp XXXX floowed by a NOP |
0003 | ? | DiskParameterTable |
XXXX | ? | BootSector code |
YYYY | ? | filled with 0 (not necessary) |
1FFE | 2 | 55AA for a bootable floppy flag |
Disk parameter table
This table describes the format of the FloppyDisk on which it resides.
It is situated at offset 0003 in the BootSector binary:
Description | Len | 360 | 720 | 1200 | 1440 | All Formats |
OEM signature | 8 | 'TCOS 0.0' | ||||
bytes per sector | 2 | 512 | ||||
sectors per cluster | 1 | 1 | ||||
reserved sectors | 2 | 1 | ||||
number of fats | 1 | 2 | ||||
number of root entries | 2 | 224 | ||||
number of sectors | 2 | 720 | 1440 | 2400 | 2880 | |
Media Type | 1 | FD | F9 | F9 | F0 | |
Sectors per fat | 2 | 9 | ||||
Sectors per track | 2 | 9 | 9 | 15 | 18 | |
Number of heads | 2 | 2 | ||||
Hidden sectors | 4 | 0 | ||||
Large Sectors | 4 | 0 | ||||
Drive number | 1 | 0 A: | ||||
NT "dirty" flags | 1 | 0 | ||||
Extended BIOS paramter block | 1 | 29h | ||||
Serial Number | 4 | 0 | ||||
Disk Label | 11 | 'TCOS ' | ||||
Fat system | 8 | 'FAT12 ' |
The BootSector source code (boot12.asm) is written for a 1440 kb FloppyDisk, hence its binary (boot12.bin) must be patched according to the table above to give you boot360.bin, boot720.bin, boot1220.bin and boot1440.bin. This patching is made via a DebugScript.
Execution scheme
BootMedium
The BootSector is designed to work on any fat12 formatted floppy with any DiskGeometry, which is HardCoded into a DiskParameterTable in the BootSector code.
Thus, the BootSector binary must be patched with the debug script to be usable from any DiskGeometry.
Installation
The boot sector is copied onto a floppy image during the BuildProcess.
Done
Links: HomePage