Int 21H [2.0] Function 44H (68) Subfunction 06H IOCTL: check input status

Returns a code indicating whether the device or file associated with a handle is ready for input.

Call with:

AH = 44H

AL = 06H

BX = handle

Returns:

If function successful

Carry flag = clear

and, for a device:

AL = 00H if device not ready

FFH if device ready

or, for a file:

AL = 00H if file pointer at EOF

FFH if file pointer not at EOF

If function unsuccessful

Carry flag = set

AX = error code

Note:

This function can be used to check the status of character devices, such as the serial port, that do not have their own "traditional" MS-DOS status calls.

Example:

Check whether a character is ready from the standard auxiliary device (usually COM1).

stdaux equ 3 ; standard auxiliary handle

.

.

.

mov ax,4406h ; function & subfunction

mov bx,stdaux ; standard auxiliary handle

int 21h ; transfer to MS-DOS

jc error ; jump if function failed

or al,al ; test status flag

jnz ready ; jump if character ready

.

.

.