NDREADREQUEST STRUC
nrrLength db ? ;length of record, in bytes
nrrUnit db ? ;not used
nrrFunction db 05h ;function number
nrrStatus dw ? ;status
nrrReserved db 8 dup(?) ;reserved
nrrChar db ? ;OUTPUT: character read from device
NDREADREQUEST ENDS
Nondestructive Read (Device-Driver Function 05h) returns the next character from the input buffer without removing it from the buffer; subsequent read operations should return the same character.
This function is required for character-device drivers only.
nrrLength
Specifies the length, in bytes, of the NDREADREQUEST structure.
nrrUnit
Not used.
nrrFunction
Specifies the Nondestructive Read function: 05h.
nrrStatus
Specifies the status of the completed function. If the device input buffer has at least one character, the busy bit (bit 9) must be zero, indicating that MS-DOS need not wait to read a character. If the input 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.
nrrReserved
Reserved; do not use.
nrrChar
Receives the next character in the input buffer. The driver must copy the character without removing it from the input buffer.
Device-Driver Function 04h Read