Device Request 08H: Output (Write Data to Device)
◄Blk► ◄Chr►
This tells the driver to write data to the device.
DevReq08Rec
Offset Size Contents
▀▀▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
+0 1 bLen 20H or 14H (length of this request packet)
+1 1 bUnitNo (not used)
+2 1 bCmd 08H (command code)
+3 2 rStatus OUTPUT: Device Status Word must fill before exit
+5H 8 res (reserved)
+0dH 1 bMediaID INPUT: Media Descriptor DOS thinks is there
+0eH 4 pfBuffer INPUT: buffer address
+12H 2 wWriteSize INPUT: number of bytes or sectors to write
OUTPUT: bytes or sectors actually written
────────────────────────────── Block Devices Only
+16H 2 wStartSect INPUT: starting sector (ffffH=use lBigSect)
+18H 4 pfVolID OUTPUT: addr of Volume ID for this unit/media
+1cH 4 lBigSect INPUT: starting sector (when wStartSect=ffffH)
32 size of this structure
rStatus On exit, the driver must place a DevStatusWord here. Always
set the Done bit (bit 8). On an error, set the Done bit and
the Error bit (bit 15) and put a Device Error Code in the low
byte.
bMediaID On entry, this contains the Media Descriptor byte of the disk
that DOS thinks is in the drive. Used by block devices only.
pfBuffer is the address of a buffer in which the driver may place the
requested data. You must not store more than wReadSize bytes
(or sectors of block devices) here.
wWriteSize on entry, specifies how much data to transfer from pfBuffer to
the device:
Character devices: requested number of bytes to write
Block devices: requested number of sectors to write
On return, fill this with the actual amount of data you
transferred (bytes or sectors)
─────────────────────────────────────────── Block Devices Only
wStartSect Logical sector number to start writing (see INT 26H). If the
sector number is larger than 65,535, this will contain ffffH
and you should use lBigSect as the 32-bit starting sector
number. Used by block devices only.
pfVolID Block devices which return Device Error Code of 0fH should set
this to the address of an ASCIIZ▲ volume ID of the disk that
should be in the drive (so DOS can prompt to insert that
disk). Used by block devices only.
lBigSect When DOS requests a logical sector number larger than 65,535,
it sets wStartSect to ffffH and puts the actual desired
starting sector number in here. Used by block devices only.
Notes: ■ It is up to the driver to translate the "logical sector number"
to head/track/sector values actually used on the device and to
access sequential sectors using that numbering scheme. See
INT 26H for the standard way to do this.
■ Driver request DvRq 09H is identical in every way, except that
the driver is expected to verify the accuracy of the data
written.
■ This is the device driver "catch-point" for DOS write fns such
as 40H (write to file or device).
See Also: Device Requests
DevRequestHdrRec
Installable Device Drivers
-♦-