Function 440Ch Minor Code 65h Get Iteration Count

mov bx, Handle ;handle of device

mov ch, Category ;device category

mov cl, 65h ;Get Iteration Count

mov dx, seg ItCount

mov ds, dx

mov dx, offset ItCount ;points to buffer for iteration count

mov ax, 440Ch ;IOCTL for Character Device

int 21h

jc error_handler ;carry set means error

Get Iteration Count (Function 440Ch Minor Code 65h) returns the number of times the device driver is to try to send output to a device before assuming that the device is busy.

Parameters

Handle

Identifies the device to get the iteration count for.

Category

Specifies the type of device. This parameter must be one of the following values:

Value Device

01h Serial device
03h Console (screen)
05h Parallel printer

ItCount

Points to a 16-bit buffer to receive the iteration count. The device driver tries to send output to the device until it reaches this number of retries unsuccessfully.

Return Value

If the function is successful, the carry flag is clear. Otherwise, the carry flag is set and the AX register contains an error value, which may be one of the following:

Value Name

0001h ERROR_INVALID_FUNCTION
0006h ERROR_INVALID_HANDLE

This function may also return a device-dependent error value as specified by the device driver.

See Also

Function 440Ch Minor Code 45h Set Iteration Count