diskfatfloppy

How are floppy disk sectors numbered


I was wondering how are floppy disk sectors ordered, I am currently writing a program to access the root directory of a floppy disk (fat12 formated High Density), I can load it with debug at sector 13h but in assembly it is at head 1 track 0 sector 2 why is sector 13h, not at head 0 track 1 sector 1?


Solution

  • That's because the sectors on the other side of the disk comes before the sectors on the second track on the first side.

    Sectors 0 through 17 (11h) are found at head 0 track 0. Sectors 18 (12h) through 35 (23h) are found at head 1 track 0.

    Logical sectors are numbered from zero up, but the sectors in a track are numbered from 1 to 18 (12h).

    sector#  head  track  sector  usage
    -------  ----  -----  ------  --------
     0  0h     0     0     1  1h  boot
     1  1h     0     0     2  2h  FAT 1
     2  2h     0     0     3  3h    |
     3  3h     0     0     4  4h    v
     4  4h     0     0     5  5h
     5  5h     0     0     6  6h
     6  6h     0     0     7  7h
     7  7h     0     0     8  8h
     8  8h     0     0     9  9h
     9  9h     0     0    10  ah
    10  ah     0     0    11  bh  FAT 2
    11  bh     0     0    12  ch    |
    12  ch     0     0    13  dh    v
    13  dh     0     0    14  eh
    14  eh     0     0    15  fh
    15  fh     0     0    16 10h
    16 10h     0     0    17 11h
    17 11h     0     0    18 12h
    18 12h     1     0     1  1h
    19 13h     1     0     2  2h  root
    20 14h     1     0     3  3h    |
    21 15h     1     0     4  4h    v
    ...