OUTPUTREQUEST STRUC
orLength db ? ;length of record, in bytes
orUnit db ? ;not used
orFunction db 10h ;function number
orStatus dw ? ;status
orReserved db 8 dup(?) ;reserved
orData db ? ;not used
orBuffer dd ? ;INPUT: buffer address
orBytes dw ? ;INPUT: number of bytes to write
;OUTPUT: number of bytes written
OUTPUTREQUEST ENDS
Output Until Busy (Device-Driver Function 10h) transfers data from the specified buffer to a device until the device signals that it cannot accept more input.
This function is used for character-device drivers only.
orLength
Specifies the length, in bytes, of the OUTPUTREQUEST structure.
orUnit
Not used.
orFunction
Specifies the Output Until Busy function: 10h.
orStatus
Specifies the status of the completed function. If the function is successful, the driver must set the done bit (bit 8). Otherwise, the driver must set both the error and done bits (bits 15 and 8) and copy an error value to the low-order byte.
orReserved
Reserved; do not use.
orData
Not used.
orBuffer
Contains the 32-bit address (segment:offset) of the buffer containing data to write to the device.
orBytes
Contains the number of bytes to write and receives the number of bytes written. The following table describes input and output:
Input/Output | Description |
Input | Specifies the number of bytes to write. This number must not exceed the amount of data in the specified buffer. |
Output | Specifies the number of bytes written. This number cannot exceed the requested number of bytes. |
This function should write as much data to the device as possible until the device signals that it cannot accept more data, at which point the function should return immediately. The driver should not wait under any circumstances. It is not an error for the driver to transfer fewer bytes than MS-DOS requested, but the driver must return a value for the number of bytes transferred.
This function allows device drivers to take advantage of a printer's internal RAM buffers. The driver can send data to the printer until the printer's internal buffer is full and then return to MS-DOS immediately, rather than wait while data is printed. MS-DOS can then periodically check the printer's status and send more data only when the printer is ready.
Device-Driver Function 08h Write