Home > CBM > Disk > BAM | |||||||||||||||||||||
The Block Availability Map (BAM) stores information about which blocks are free (available) for storing new data. It is a sequence of t data structures where t is the number of used tracks on the disk. Each data structure has two parts: first a (single byte) count of available sectors on the track followed by a (multi-byte) bitmap of available sectors (where bit value 1 = sector available). The number of bytes in the bitmap varies by format. The bitmap has 3 bytes for 1540/1541/1551/1570/1571. It has 5 bytes for the 1581. Its size varies for the CMD floppy and hard disks. Let's look at an example from track 18 of a 1541-formatted floppy disk.
In the example, eleven blocks are available on the track. For sectors 0 to 7, sectors 2, 5 and 7 are available. For sectors 8 to 15, all sectors are available except 9 and 14. For sectors 16 to 23, sectors 16 and 18 are available. © Hydrophilic.net, 2026 | |||||||||||||||||||||