Function 0CH (12): I/O-Control Write

The IOCTL write function allows an application program to pass control information directly to the driver. This function is called only if bit 14 is set in the device attribute word. MS-DOS performs no error check on IOCTL I/O calls.

The IOCTL write function is called with

RH + 1 BYTE Unit code (block devices)

RH + 2 BYTE Command code = 12 (0CH)

RH + 13 BYTE Media descriptor byte

RH + 14 DWORD Transfer address

RH + 18 WORD Byte/sector count

RH + 20 WORD Starting sector number (block

devices)

It returns

RH + 3 WORD Status

RH + 18 WORD Actual bytes or sectors transferred