Input Status (Device-Driver Function 06h)

STATUSREQUEST STRUC

srLength db ? ;length of record, in bytes

srUnit db ? ;not used

srFunction db 06h ;function number

srStatus dw ? ;status

srReserved db 8 dup(?) ;reserved

STATUSREQUEST ENDS

Input Status (Device-Driver Function 06h) specifies whether any characters are waiting in the device-input buffer.

This function is required for character-device drivers only.

Fields

srLength

Specifies the length, in bytes, of the STATUSREQUEST structure.

srUnit

Not used.

srFunction

Specifies the Input Status function: 06h.

srStatus

Specifies the status of the completed function. If the device-input buffer has waiting characters, the busy bit (bit 9) must be zero, indicating that MS-DOS need not wait to read a character. If the buffer has no characters, the driver must set the busy bit. In both cases, the driver must set the done bit (bit 8).

If the function is not successful, the driver must set both the error and done bits (bits 15 and 8) and copy an error value to the low-order byte.

srReserved

Reserved; do not use.

Comments

If the device has no input buffer, the busy bit must be zero.

Before attempting to read a character, MS-DOS may wait for a device to return a not-busy status.

See Also

Device-Driver Function 0Ah Output Status
Interrupt 21h Function 4406h Check Device Input Status