Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Ralf Brown's Interrupt List (Part 1,2) - int 21 - dos 2+ internal - get drive parameter block http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INT 21 - DOS 2+ internal - GET DRIVE PARAMETER BLOCK
        AH = 32h
        DL = drive number
            0 = default, 1 = A, etc.
Return: AL = FFh if invalid drive number, else
        DS:BX -> drive parameter block (see below)
Note:   the OS/2 compatibility box supports the DOS 3.3 version of this call
          except for the DWORD at offset 12h
SeeAlso: AH=1Fh

Format of DOS Drive Parameter Block:
Offset  Size    Description
 00h    BYTE    drive number (0 = A, etc.)
 01h    BYTE    unit number within device driver
 02h    WORD    number of bytes per sector
 04h    BYTE    largest sector number in cluster (one less than sect/clust)
 05h    BYTE    log base two of the cluster size
 06h    WORD    number of reserved (boot) sectors
 08h    BYTE    number of copies of the FAT
 09h    WORD    number of root directory entries
 0Bh    WORD    first data sector on medium
 0Dh    WORD    largest possible cluster number (one more than # data clust)
---DOS 2.x---
 0Fh    BYTE    number of sectors in one FAT copy
 10h    WORD    first sector of root directory
 12h    DWORD   address of device driver for this drive
 16h    BYTE    media descriptor byte for medium
 17h    BYTE    FFh indicates block must be rebuilt
 18h    DWORD   address of next device block, offset = FFFFh indicates last
 1Ch    WORD    starting cluster of current directory (0 = root directory)
 1Eh 64 BYTEs   ASCIZ current directory path string
---DOS 3.x---
 0Fh    BYTE    number of sectors in one FAT copy
 10h    WORD    first sector of root directory
 12h    DWORD   address of device driver for this drive
 16h    BYTE    media descriptor byte for medium
 17h    BYTE    FFh = block must be rebuilt, 00h indicates block accessed
 18h    DWORD   address of next device block, offset = FFFFh indicates last
 1Ch    WORD    cluster at which to start search for free space when writing
 1Eh    WORD    number of free clusters on drive, FFFFh = unknown
---DOS 4.0---
 0Fh    WORD    number of sectors in one FAT copy
 11h    WORD    first sector of root directory
 13h    DWORD   address of device driver for this drive
 17h    BYTE    media descriptor byte for medium
 18h    BYTE    FFh = block must be rebuilt, 00h indicates block accessed
 19h    DWORD   address of next device block, offset = FFFFh indicates last
 1Dh    WORD    cluster at which to start search for free space when writing
 1Fh    WORD    number of free clusters on drive, FFFFh = unknown

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson