Public Attributes
biosParmBlock Struct Reference

BIOS parameter block. More...

#include <FatStructs.h>

List of all members.

Public Attributes

uint16_t bytesPerSector
 Count of bytes per sector.
uint8_t sectorsPerCluster
 Number of sectors per allocation unit.
uint16_t reservedSectorCount
 Number of sectors before the first FAT.
uint8_t fatCount
 The count of FAT data structures on the volume.
uint16_t rootDirEntryCount
 For FAT12 and FAT16 volumes, this field contains the count of 32-byte directory entries in the root directory.
uint16_t totalSectors16
 This field is the old 16-bit total count of sectors on the volume.
uint8_t mediaType
 This dates back to the old MS-DOS 1.x media determination and is no longer usually used for anything.
uint16_t sectorsPerFat16
 Count of sectors occupied by one FAT on FAT12/FAT16 volumes.
uint16_t sectorsPerTrtack
 Sectors per track for interrupt 0x13.
uint16_t headCount
 Number of heads for interrupt 0x13.
uint32_t hidddenSectors
 Count of hidden sectors preceding the partition that contains this FAT volume.
uint32_t totalSectors32
 This field is the new 32-bit total count of sectors on the volume.
uint32_t sectorsPerFat32
 Count of sectors occupied by one FAT on FAT32 volumes.
uint16_t fat32Flags
 This field is only defined for FAT32 media and does not exist on FAT12 and FAT16 media.
uint16_t fat32Version
 FAT32 version.
uint32_t fat32RootCluster
 Cluster number of the first cluster of the root directory for FAT32.
uint16_t fat32FSInfo
 Sector number of FSINFO structure in the reserved area of the FAT32 volume.
uint16_t fat32BackBootBlock
 If non-zero, indicates the sector number in the reserved area of the volume of a copy of the boot record.
uint8_t fat32Reserved [12]
 Reserved for future expansion.

Detailed Description

BIOS parameter block.

The BIOS parameter block describes the physical layout of a FAT volume.

Definition at line 128 of file FatStructs.h.


Member Data Documentation

Count of bytes per sector.

This value may take on only the following values: 512, 1024, 2048 or 4096

Definition at line 133 of file FatStructs.h.

If non-zero, indicates the sector number in the reserved area of the volume of a copy of the boot record.

Usually 6. No value other than 6 is recommended.

Definition at line 233 of file FatStructs.h.

This field is only defined for FAT32 media and does not exist on FAT12 and FAT16 media.

Bits 0-3 -- Zero-based number of active FAT. Only valid if mirroring is disabled. Bits 4-6 -- Reserved. Bit 7 -- 0 means the FAT is mirrored at runtime into all FATs. -- 1 means only one FAT is active; it is the one referenced in bits 0-3. Bits 8-15 -- Reserved.

Definition at line 212 of file FatStructs.h.

Sector number of FSINFO structure in the reserved area of the FAT32 volume.

Usually 1.

Definition at line 227 of file FatStructs.h.

Reserved for future expansion.

Code that formats FAT32 volumes should always set all of the bytes of this field to 0.

Definition at line 238 of file FatStructs.h.

Cluster number of the first cluster of the root directory for FAT32.

This usually 2 but not required to be 2.

Definition at line 222 of file FatStructs.h.

FAT32 version.

High byte is major revision number. Low byte is minor revision number. Only 0.0 define.

Definition at line 217 of file FatStructs.h.

The count of FAT data structures on the volume.

This field should always contain the value 2 for any FAT volume of any type.

Definition at line 148 of file FatStructs.h.

Number of heads for interrupt 0x13.

Not used otherwise.

Definition at line 184 of file FatStructs.h.

Count of hidden sectors preceding the partition that contains this FAT volume.

This field is generally only relevant for media visible on interrupt 0x13.

Definition at line 190 of file FatStructs.h.

This dates back to the old MS-DOS 1.x media determination and is no longer usually used for anything.

0xF8 is the standard value for fixed (non-removable) media. For removable media, 0xF0 is frequently used. Legal values are 0xF0 or 0xF8-0xFF.

Definition at line 174 of file FatStructs.h.

Number of sectors before the first FAT.

This value must not be zero.

Definition at line 144 of file FatStructs.h.

For FAT12 and FAT16 volumes, this field contains the count of 32-byte directory entries in the root directory.

For FAT32 volumes, this field must be set to 0. For FAT12 and FAT16 volumes, this value should always specify a count that when multiplied by 32 results in a multiple of bytesPerSector. FAT16 volumes should use the value 512.

Definition at line 157 of file FatStructs.h.

Number of sectors per allocation unit.

This value must be a power of 2 that is greater than 0. The legal values are 1, 2, 4, 8, 16, 32, 64, and 128.

Definition at line 139 of file FatStructs.h.

Count of sectors occupied by one FAT on FAT12/FAT16 volumes.

On FAT32 volumes this field must be 0, and sectorsPerFat32 contains the FAT size count.

Definition at line 180 of file FatStructs.h.

Sectors per track for interrupt 0x13.

Not used otherwise.

Definition at line 182 of file FatStructs.h.

This field is the old 16-bit total count of sectors on the volume.

This count includes the count of all sectors in all four regions of the volume. This field can be 0; if it is 0, then totalSectors32 must be non-zero. For FAT32 volumes, this field must be 0. For FAT12 and FAT16 volumes, this field contains the sector count, and totalSectors32 is 0 if the total sector count fits (is less than 0x10000).

Definition at line 167 of file FatStructs.h.

This field is the new 32-bit total count of sectors on the volume.

This count includes the count of all sectors in all four regions of the volume. This field can be 0; if it is 0, then totalSectors16 must be non-zero.

Definition at line 197 of file FatStructs.h.


The documentation for this struct was generated from the following file: