Returns a device information word for the file or device associated with the specified handle.
Call with:
AH = 44H
AL = 00H
BX = handle
Returns:
If function successful
Carry flag = clear
DX = device information word
For a file:
Bit(s) Significance
0—5 drive number (0 = A, 1 = B, etc.)
6 0 if file has been written
1 if file has not been written
7 0, indicating a file
8—15 reserved
For a device:
Bit(s) Significance
0 1 if standard input
1 1 if standard output
2 1 if NUL device
3 1 if clock device
4 reserved
5 0 if handle in ASCII mode
1 if handle in binary mode
6 0 if end of file on input
7 1, indicating a device
8—13 reserved
14 0 if IOCTL subfunctions 02H and 03H not
supported
1 if IOCTL subfunctions 02H and 03H supported
15 reserved
If function unsuccessful
Carry flag = set
AX = error code
Notes:
Bits 8—15 of DX correspond to the upper 8 bits of the device-driver attribute word.
Bit 5 of the device information word for a handle associated with a character device signifies whether MS-DOS considers that handle to be in binary ("raw") mode or ASCII ("cooked") mode. In ASCII mode, MS-DOS filters the character stream and may take special action when the characters Ctrl-C, Ctrl-S, Ctrl-P, Ctrl-Z, and carriage return are detected. In binary mode, all characters are treated as data, and the exact number of characters requested is always read or written.
Example:
See Int 21H Function 44H Subfunction 01H.