| |
ATTRIBUTE FIELD
The attribute field is a word field that describes the attributes
of the device driver to the system. The attributes are:
Attributes |
Bit |
Dec |
Hex |
Description |
0 |
1 |
0001h |
Standard Input Device |
1 |
2 |
0002h |
Standard Output Device |
2 |
4 |
0004h |
NUL Device |
3 |
8 |
0008h |
CLOCK$ Device |
4 |
16 |
0010h |
Reserved |
5 |
32 |
0020h |
6 |
64 |
0040h |
7 |
128 |
0080h |
8 |
256 |
0100h |
9 |
512 |
0200h |
10 |
1024 |
0400h |
11 |
2048 |
0800h |
Suports removable
media |
12 |
4096 |
1000h |
Unknown |
13 |
8192 |
2000h |
Non-IBM Format |
14 |
16384 |
4000h |
Can process IOCTL
strings |
15 |
32768 |
8000h |
Type 0=Block,
1=Character |
BIT 15 is the device type bit. Use it to tell the system the
that driver is a block or character device.
BIT 14 is the IOCTL bit. It is used for both character and
block devices. Use it to tell DOS whether the device
driver can handle control strings through the IOCTL
function call 44h. If a device driver cannot process
control strings, it should set bit 14 to 0. This way
DOS can return an error is an attempt is made through
the IOCTL function call to send or receive control
strings to the device. If a device can process control
strings, it should set bit 14 to 1. This way, DOS makes
calls to the IOCTL input and output device function to
send and receive IOCTL strings. The IOCTL functions
allow data to be sent to and from the device without
actually doing a normal read or write. In this way, the
device driver can use the data for its own use, (for
example, setting a baud rate or stop bits, changing
form lengths, etc.) It is up to the device to interpret
the information that is passed to it, but the
information must not be treated as a normal I/O
request.
BIT 13 is the non-IBM format bit. It is used for block devices
only. It affects the operation of the Get BPB (BIOS
parameter block) device call.
BIT 11 is the open/close removeable media bit. Use it to tell
DOS if the device driver can handle removeable media.
(DOS 3.x only)
BIT 3 is the clock device bit. It is used for character
devices only. Use it to tell DOS if your character
device driver is the new CLOCK$ device.
BIT 2 is the NUL attribute bit. It is used for character
devices only. Use it to tell DOS if your character
device driver is a NUL device. Although there is a NUL
device attribute bit, you cannot reassign the NUL
device. This is an attribute that exists for DOS so
that DOS can tell if the NUL device is being used.
BIT 0/1 are the standard input and output bits. They are used
for character devices only. Use these bits to tell DOS
if your character device driver is the new standard
input device or standard output device. |