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 08h write b c</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Device driver function 08h      Write                   B   C

    Write and Write with Verify transfer data from the specified
    buffer to a device.
    Write with Verify also reads the data back from the device, if
    possible, to verify that the data has been transferred correctly

    This function is required for both block and character device
    drivers.

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

    The driver must translate the logical-sector number supplied in
    the rwrStartSec or rwrHugeStartSec field to the appropriate head,
    track, and sector numbers.

    The rwrHugeStartSec field is used only if bit 1 is set in the
    dhAttributes field in the block device driver's DeviceHeader
    structure.

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

    rwrUnit
    Specifies the device to which data is to be written. This field is
    used for block device drivers only.


    rwrStatus
    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.


    rwrMediaID
    Specifies the media descriptor for the medium DOS assumes is in
    the drive. This field is used for block device drivers only.
    - See Media


    rwrBuffer
    Contains the 32-bit address of the buffer containing the data to
    write to the device.


    rwrBytesSec
    Contains the number of bytes or sectors to write and receives the
    number of bytes or sectors written.

        input   Specifies the number of bytes to write to a character
                device, or the number of sectors to write to a block
                device.

        output  Specifies the number of bytes written to a character
                device, or the number of sectors written to a block
                device. The driver must set this field; if there is an
                error, the driver should return the number of bytes or
                sectors written before the error occurred.


    rwrStartSec
    Specifies the first logical sector to write. If the first sector
    is larger than 65,535 bytes, this field contains 0FFFFh and the
    rwrHugeStartSec field specifies the first sector. This field is
    used for block device drivers only.


    rwrVolumeID
    Contains the 32-bit address of a zero-terminated ASCII string
    specifying the volume identifier for the disk most recently
    accessed. If the driver returns error value 0Fh (invalid disk
    change), DOS uses the volume identifier to prompt the user to
    insert the appropriate disk. This field is used for block device
    drivers only.


    rwrHugeStartSec
    Specifies the first logical sector to write. This field is used
    only if the rwrStartSec field contains 0FFFFh. This field is used
    for block device drivers only.

See Also: ReadWriteRequest Dev01h Dev04h 40h Media DeviceHeader Dev*

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