Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Other DOS - <b> dpt/dpb - drive parameter table / disk parameter block</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
           DPT/DPB - Drive Parameter Table / Disk Parameter Block

      Offset Size             Description

        00   byte       drive (0 = A, 1 = B)
        01   byte       unit within device, usually equals drive (ramdisk=0)
        02   word       bytes per sector
        04   byte       sectors per cluster minus 1
        05   byte       sectors per cluster (times to shift left or x2)
        06   word       number of sectors before FAT (boot sectors)
        08   byte       number of FAT copies
        09   word       number of root directory entries
        0B   word       number of first data sector
        0D   word       total number of clusters plus 1
        0F   byte       number of sectors used by first FAT

      The following fields are DOS version dependant

        10   word       number of first sector in root directory
        12   dword      far pointer to current disk device header
        16   byte       media descriptor byte (see MEDIA DESCRIPTOR)
        17   byte       zero if disk accessed, (default=FF, must rebuild DPB)
        18   dword      far pointer to next drive parameter table; offset
                        is set to FFFFh if last block in chain
        1C   word       current directory cluster number; 0=root
        1E  64bytes     ASCIIZ current working directory


                        Fields differing in DOS 3.x

      Offset Size             Description
        1C   word       starting cluster for free space search
        1E  64bytes     number of free clusters; FFFFh = unknown


                        Fields differing in DOS 4.x

      Offset Size             Description
        11   word       first sector of root directory
        13   dword      far pointer to current disk device header
        17   byte       media descriptor byte (see MEDIA DESCRIPTOR)
        18   byte       zero if disk accessed, (default=FF, must rebuild DPB)
        19   dword      pointer to next drive parameter table; offset
                        is set to FFFFh if last block in chain
        1D   word       starting cluster for free space search
        1F   word       number of free clusters, FFFFh = unknown


        - INT 21,32 which is used to read this data resets accessed byte at
          offset 17h or 18h (depending on DOS version)
        - dword at offset 12h & 13h aren't supported in OS/2 compatability box
        - sector references are DOS logical sectors
        - see   Disk Base Table  BPB  INT 21,1F  INT 21,32

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