I'm writing a two stage bootloader for a FAT12 filesystem. The stage1 of the bootloader loads the stage2 from a floppy disk which is in FAT12 filesystem. Now I am having problem converting the cluster number (that I obtain from the FAT table) to a format containing the track, head and sector number. I was following the tutorial http://www.brokenthorn.com/Resources/OSDev6.html for making the bootloader.
My confusion here is that in the tutorial the Cluster Number obtained from the FAT is converted to LBA(Linear Block Address) format first and then converted to CHS(Cylinder Head Sector) Format before reading the sector into memory.
Why can't I directly convert the Cluster Number into CHS format?? Does the FAT table not store the Cluster Numbers linearly?? I want to know exactly what i am missing here??
The link to the source code of the bootloader used in the tutorial is at the end of the page of the link http://www.brokenthorn.com/Resources/OSDev6.html.