16 bit Assembly
Home Feedback Site Map Instruction Index
Every disk holds its parameters in the Boot sector, if these details become corrupted, it will be difficult and often impossible to access the disk.
The parameeters are stored in the first 70 bytes of the Boot sector, starting from the 4th byte.
The first 3 bytes are a jump instruction pointing to the start of the bootup code.
There 2 ways to obtain disk parameter.
These are the parameters on my floppy disk. By reading the Boot sector to memory you can read and display the parameters. However the bottom 3 (Cylinders, Drive Type and Total Drives) are obtains from the BIOS interupt call.
The Boot sector will look similar to the hex dump below. The paremater block has been highlighted in yellow.
The values below are shown in the boot sequence in Hexidecimal. Values in brackets are the decimal values.
E9 43 00 Jump to start of boot code 50 45 52 2D 4F 53 2D 31 "PER-OS-1" manufacturers name 00 02 bytes per sector (512) 01 Sectors per Allocation (1) 01 00 Reserved Sectors (1) 02 Total FATS (2) E0 00 Root Entries (224) 40 0B Total Sectors (2880) F0 Descriptor = 1.44Mb, 18 sectors, 2 heads 09 00 Sectors per FAT (9) 12 00 Sectors per Cylinder (18) 02 00 Total Heads (0 and 1) 00 00 00 00 Hidden Sectors 00 00 00 00 Total Sectors > 64k (mainly USB and hard drives) 00 Drive Number (0=A:) 00 Reserved 28 Extended Boot Signature (40), 0x28h for old floppy formats else 0x29h 30 30 30 31 Serial Number 50 45 52 50 45 54 55 41 4C 4F 53 "PERPETUALOS" Volume Label 46 41 54 31 32 20 20 20 FAT Type Name "FAT12" 00 00 00 00 00 00 00 00 Reserved