Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Ralf Brown's Interrupt List (Part 1,2) - int 2f - multiplex - driver.sys support - execute device driver request http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INT 2F - Multiplex - DRIVER.SYS support - EXECUTE DEVICE DRIVER REQUEST
        AX = 0802h
        ES:BX -> device driver request header (see below)
Return: request header updated as per requested operation

Format of device driver request header:
Offset  Size    Description
 00h    BYTE    length of request header
 01h    BYTE    subunit within device driver
 02h    BYTE    command code (see below)
 03h    WORD    status (filled in by device driver)
                bit 15: error
                bits 14-10: reserved
                bit 9: busy
                bit 8: done
                bits 7-0: error code if bit 15 set (see below)
---DOS---
 05h  8 BYTEs   reserved (unused in DOS 2.x and 3.x)
---STARLITE architecture---
 05h    DWORD   pointer to next request header
 09h  4 BYTEs   reserved
---command code 00h---
 0Dh    BYTE    number of units (set by driver)
 0Eh    DWORD   address of first free byte following driver (set by driver)
 12h    DWORD   pointer to BPB array (set by block drivers only)
 16h    BYTE    (DOS 3+) drive number for first unit of block driver (0=A)
---command code 01h---
 0Dh    BYTE    media descriptor
 0Eh    BYTE    returned status
                00h don't know
                01h media has not changed
                FFh media has been changed
 0Fh    DWORD   (DOS 3+) pointer to previous volume ID if OPEN/CLOSE/RM bit in
                  device header set and disk changed (set by driver)
---command code 02h---
 0Dh    BYTE    media descriptor
 0Eh    DWORD   transfer address
                -> scratch sector if NON-IBM FORMAT bit in device header set
                -> first FAT sector otherwise
 12h    DWORD   pointer to BPB (set by driver)
---command codes 03h,0Ch---
 0Dh    BYTE    media descriptor (block devices only)
 0Eh    DWORD   transfer address
 12h    WORD    byte count (character devices) or sector count (block devices)
 14h    WORD    starting sector number (block devices only)
---command codes 04h,08h,09h---
 0Dh    BYTE    media descriptor (block devices only)
 0Eh    DWORD   transfer address
 12h    WORD    byte count (character devices) or sector count (block devices)
 14h    WORD    starting sector number (block devices only)
 16h    DWORD   (DOS 3+) pointer to volume ID if error 0Fh returned
---command code 05h---
 0Dh    BYTE    byte read from device if BUSY bit clear on return
---command codes 06h,07h,0Ah,0Bh,0Dh,0Eh,0Fh---
 no further fields
---command code 10h---
 0Dh    BYTE    unused
 0Eh    DWORD   transfer address
 12h    WORD    byte count
---command code 13h---
 0Dh    BYTE    category code
                00h unknown
                01h COMn:
                03h CON
                05h LPTn:
                08h disk
                9Eh (STARLITE) Media Access Control driver
 0Eh    BYTE    function code
                00h (STARLITE) MAC Bind request
 0Fh    WORD    copy of DS at time of IOCTL call (apparently unused in DOS 3.3)
 11h    WORD    offset of device driver header
 13h    DWORD   pointer to parameter block from INT 21/AX=440Dh

Values for command code:
        00h INIT
        01h MEDIA CHECK (block devices)
        02h BUILD BPB (block devices)
        03h IOCTL INPUT
        04h INPUT
        05h NONDESTRUCTIVE INPUT, NO WAIT (character devices)
        06h INPUT STATUS (character devices)
        07h INPUT FLUSH (character devices)
        08h OUTPUT
        09h OUTPUT WITH VERIFY
        0Ah OUTPUT STATUS (character devices)
        0Bh OUTPUT FLUSH (character devices)
        0Ch IOCTL OUTPUT
        0Dh (DOS 3+) DEVICE OPEN
        0Eh (DOS 3+) DEVICE CLOSE
        0Fh (DOS 3+) REMOVABLE MEDIA (block devices)
        10h (DOS 3+) OUTPUT UNTIL BUSY (character devices)
        11h unused
        12h unused
        13h (DOS 3.2+) GENERIC IOCTL
        14h unused
        15h unused
        16h unused
        17h (DOS 3.2+) GET LOGICAL DEVICE
        18h (DOS 3.2+) SET LOGICAL DEVICE
        80h (CD-ROM) READ LONG
        81h (CD-ROM) reserved
        82h (CD-ROM) READ LONG PREFETCH
        83h (CD-ROM) SEEK
        84h (CD-ROM) PLAY AUDIO
        85h (CD-ROM) STOP AUDIO
        86h (CD-ROM) WRITE LONG
        87h (CD-ROM) WRITE LONG VERIFY
        88h (CD-ROM) RESUME AUDIO

Values for error code:
        00h write-protect violation
        01h unknown unit
        02h drive not ready
        03h unknown command
        04h CRC error
        05h bad drive request structure length
        06h seek error
        07h unknown media
        08h sector not found
        09h printer out of paper
        0Ah write fault
        0Bh read fault
        0Ch general failure
        0Dh reserved
        0Eh reserved
        0Fh invalid disk change

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