DPB

DPB STRUC

dpbDrive db ? ;drive number (0 = A, 1 = B, etc.)

dpbUnit db ? ;unit number for driver

dpbSectorSize dw ? ;sector size, in bytes

dpbClusterMask db ? ;sectors per cluster - 1

dpbClusterShift db ? ;sectors per cluster, as power of 2

dpbFirstFAT dw ? ;first sector containing FAT

dpbFATCount db ? ;number of FATs

dpbRootEntries dw ? ;number of root-directory entries

dpbFirstSector dw ? ;first sector of first cluster

dpbMaxCluster dw ? ;number of clusters on drive + 1

dpbFATSize dw ? ;number of sectors occupied by FAT

dpbDirSector dw ? ;first sector containing directory

dpbDriverAddr dd ? ;address of device driver

dpbMedia db ? ;media descriptor

dpbFirstAccess db ? ;indicates access to drive

dpbNextDPB dd ? ;address of next drive parameter block

dpbNextFree dw ? ;last allocated cluster

dpbFreeCnt dw ? ;number of free clusters

DPB ENDS

The DPB structure contains information about a drive and the medium in the drive.

Fields

dpbDrive

Specifies the drive number (0 = A, 1 = B, and so on).

dpbUnit

Specifies the unit number. The device driver uses the unit number to distinguish the specified drive from the other drives it supports.

dpbSectorSize

Specifies the size of each sector, in bytes.

dpbClusterMask

Specifies one less than the number of sectors per cluster.

dpbClusterShift

Specifies the number of sectors per cluster, expressed as a power of 2.

dpbFirstFAT

Specifies the sector number of the first sector containing the file allocation table (FAT).

dpbFATCount

Specifies the number of FATs.

dpbRootEntries

Specifies the number of entries in the root directory.

dpbFirstSector

Specifies the sector number of the first sector in the first cluster.

dpbMaxCluster

Specifies one more than the maximum number of clusters on the drive.

dpbFATSize

Specifies the number of sectors occupied by each FAT.

dpbDirSector

Specifies the sector number of the first sector containing the root directory.

dpbDriverAddr

Specifies the 32-bit address (segment:offset) of the DEVICEHEADER structure for the device driver supporting the specified drive.

dpbMedia

Specifies the media descriptor for the medium in the specified drive.

dpbFirstAccess

Specifies whether the medium in the drive has been accessed. This field is 0FFh if the medium has not been accessed.

dpbNextDPB

Specifies the 32-bit address (segment:offset) of the next drive parameter block.

dpbNextFree

Specifies the cluster number of the last allocated cluster.

dpbFreeCnt

Specifies the number of free clusters on the medium. This field is 0FFFFh if the number is unknown.

See Also

Interrupt 21h Function 1Fh Get Default DPB
Interrupt 21h Function 32h Get DPB