Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Interrupts & Ports - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

        Get DOS Drive Parameter Block (INT 21h, 32h)


        Entry:
          AH = 32h
          DL = drive number
                 0 = default, 1 = A, etc.
        Return:
          AL = Status
                 0FFh if invalid drive number, else
                 DS:BX = Address of DOS Drive Parameter Block (DDPB).

        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

Note: the OS/2 compatibility box supports this call except for the DWORD at 12h

See Also: INT 21h, 1Fh DDPB

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