DEVICEHEADER STRUC
dhLink dd ? ;link to next driver
dhAttributes dw ? ;device attributes
dhStrategy dw ? ;strategy-routine offset
dhInterrupt dw ? ;interrupt-routine offset
dhNameOrUnits db '????????' ;logical-device name
;(character device only)
;or number of units
;(block device only)
DEVICEHEADER ENDS
The DEVICEHEADER structure contains information about a device driver.
dhLink
Points to the next driver in the device-driver chain. For the last driver in the chain, this field is 0FFFFh.
dhAttributes
Specifies device attributes. The meaning of an individual bit in this field depends on the device type as specified by bit 15. Any bits in this field that are not used must be zero.
For character devices (bit 15 is 1), the field has the following attributes:
Bit | Description |
0 | 1 = Standard input (STDIN) device. |
1 | 1 = Standard output (STDOUT) device. |
2 | 1 = NUL device. |
3 | 1 = Clock device. |
4 | 1 = Special device; fast character output. |
5 | Reserved; must be zero. |
6 | 1 = Driver supports Generic IOCTL (Device-Driver Function 13h). |
7 | 1 = Driver supports Query IOCTL (Device-Driver Function 19h). |
8–10 | Reserved; must be zero. |
11 | 1 = Device supports Open Device and Close Device (Device-Driver Functions 0Dh and 0Eh). |
12 | Reserved; must be zero. |
13 | 1 = Driver supports Output Until Busy (Device-Driver Function 10h). |
14 | 1 = Driver supports IOCTL Read and IOCTL Write (Device-Driver Functions 03h and 0Ch). |
15 | 1 = Character device. |
For block devices (bit 15 is 0), the field has the following attributes:
Bit | Description |
0 | Reserved; must be zero. |
1 | 1 = Driver supports 32-bit sector addressing. |
2–5 | Reserved; must be zero. |
6 | 1 = Driver supports Generic IOCTL, Get Logical Device, and Set Logical Device (Device-Driver Functions 13h, 17h, and 18h). |
7 | 1 = Driver supports Query IOCTL (Device-Driver Function 19h). |
8–10 | Reserved; must be zero. |
11 | 1 = Driver supports Open Device, Close Device, and Removable Media (Device-Driver Functions 0Dh, 0Eh, and 0Fh). |
12 | Reserved; must be zero. |
13 | 1 = Driver requires MS-DOS to supply the first 512 bytes of the file allocation table (FAT) whenever it calls Build BPB (Device-Driver Function 02h). |
14 | 1 = Driver supports IOCTL Read and IOCTL Write (Device-Driver Functions 03h and 0Ch). |
15 | 0 = Block device. |
dhStrategy
Specifies the offset of the strategy routine. The routine's segment address is the same as for the device header.
dhInterrupt
Specifies the offset of the interrupt routine. The routine's segment address is the same as for the device header.
dhNameOrUnits
Specifies the logical-device name or number of units, depending on the device type (as specified by bit 15 in the dhAttributes field).
For a character device (bit 15 is 1), all 8 bytes of this field specify the logical-device name. If the name has fewer than eight characters, the remaining bytes must be space characters (ASCII 20h).
For a block device (bit 15 is 0), the first byte of this field specifies the number of units (drives) this driver supports; the remaining bytes are reserved.
Interrupt 24h Critical-Error Handler
Interrupt 2Fh Function 0106h Get Printer Device