Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- DOS 5.0 Ref. - <b>device driver function 13h generic ioctl b c</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Device driver function 13h      Generic IOCTL           b   c

    Generic IOCTL directs the driver to carry out the generic input-
    and-output-control function specified by the giCategory and
    giMinorCode fields.

    This function can be used both for block and character device
    drivers.

    ------------------------------------------------------------------

    The driver must interpret the category and minor codes to
    determine which operation to carry out and then return any
    applicable information in the structure pointed to by the
    giIOCTLData field.

    DOS calls this function only if bit 6 is set in the dhAttributes
    field of the DeviceHeader structure for the driver.

    ------------------------------------------------------------------

    giUnit
    Specifies the device number on which to carry out the IOCTL
    function. This field is used for block device drivers only.


    giStatus
    Specifies the status of the completed function. If the function
    was 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.


    giCategory
    Specifies the device category. Serial, console, parallel, and disk
    drivers are represented by the following values:

                01h     Serial device
                03h     Console (display)
                05h     Parallel printer
                08h     Disk

    If the driver supports a type of device not listed, the field must
    specify an 8-bit number that uniquely identifies the device. The
    driver must check this value.


    giMinorCode
    Specifies the minor code for Interrupt 21h function 440Ch, Generic
    IOCTL for Character Devices. The meaning of the minor code depends
    on the device category.
    For serial, console, and parallel drivers, it can be one of the
    following:

                45h     Set Iteration Count
                4ah     Select Code Page
                4ch     Start Code-Page Prepare
                4dh     End Code-Page Prepare
                65h     Get Iteration Count
                6ah     Query Selected Code Page
                6bh     Query Code-Page Prepare List

    For disk drivers, the value specifies the minor code for Interrupt
    21h function 440Dh, Generic IOCTL for Block Devices. It can be one
    of the following:

                40h     Set Device Parameters
                41h     Write Track on Logical Device
                42h     Format Track on Logical Device
                46h     Set Media ID
                60h     Get Device Parameters
                61h     Read Track on Logical Device
                62h     Verify Track on Logical Device
                66h     Get Media ID
                68h     Sense Media Type

    Drivers can support additional minor codes as needed.


    giIOCTLData
    Contains a 32-bit address of the structure associated with the
    specified IOCTL function. The structure type and contents depend
    on the minor code as specified by the giMinorCode field.

See Also: IOCTLRequest Dev19h 440Ch 440Dh DeviceHeader Dev*

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson