Int 21H [2.0] Function 44H (68) Subfunction 01H IOCTL: set device information

Sets certain flags for a handle associated with a character device. This subfunction may not be used for a handle that is associated with a file.

Call with:

AH = 44H

AL = 01H

BX = handle

DX = device information word

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 (0)

5 0 to select ASCII mode

1 to select binary mode

6 reserved (0)

7 1, indicating a device

8—15 reserved (0)

Returns:

If function successful

Carry flag = clear

If function unsuccessful

Carry flag = set

AX = error code

Notes:

If register DH does not contain 00H, control returns to the program with the carry flag set and error code 0001H (invalid function) in register AX.

Bit 5 of the information word for a handle associated with a character device signifies whether MS-DOS considers that handle to be in binary ("raw") or ASCII ("cooked") mode. See Notes for Int 21H Function 44H Subfunction 00H.

Example:

Place the standard output handle into binary ("raw") mode. This speeds up output by disabling checking for Ctrl-C, Ctrl-S, and Ctrl-P between each character.

.

.

.

; get device information

mov ax,4400h ; function & subfunction

mov bx,1 ; standard output handle

int 21h ; transfer to MS-DOS

mov dh,0 ; force DH = 0

or dl,20h ; set binary mode bit

; set device information

mov ax,4401h ; function & subfunction

int 21h ; transfer to MS-DOS

.

.

.