I got some floppy images (original DOS 6.22 und FreeDOS 1.44 MB boot disks) created using the *nix dd
command that work fine when used in a virtual environment.
Now I want to understand the structure of these files.
As far as I know a 1.44 MB floppy disk has 80 tracks, each track has 18 sectors and each sector consists of 512 bytes. Multiplying this gets me to about 0.7MB which is exactly the size of one of the two sides.
The position of track 0 sector 2 head 2 is 9728 (or 0x2600) - this is the first sector the DOS 6.22 bootloader fetches from the disk. But how is this calculated?
How do I get to these values? I used an emulator to step through the bootloader. The first floppy access is done by calling interrupt 013h with AH = 2 (read from floppy), AL = 1 (read one sector), CH = 0 (read from track 0), CL = 2 (read from sector 2) and DH = 1 (use head 1 = use second side). This call gets the emulator to load the bytes starting at position 9728.
Each register value except of the sector number (which is 1-based) is 0-based.
Thanks in advance!
0x2600
is calculated from the passed register values (AH, AL, CH, CL, DH)?