Each request to a device driver is accompanied by a pointer to a request
structure or "packet".  Each packet begins with this 13-byte header.  Upon
entry into a driver, ES:BX always points to a packet in this layout.

Offset Size Contents
+0      1  bLen         length of this request packet (header and data)
+1      1  bUnitNo      unit number (used for block devices only)
+2      1  bCmd         command code (Device Request number)
+3      2  rStatus      Device Status Word must be filled before return
+5H     8  res          (reserved)
13               length of common portion of all request packets
+0dH     ?  abData       variable-length data formatted according to the
command code.  See Device Requests.

rStatus  On exit, the driver must place a DevStatusWord here.  Always
set the Done bit (bit 8) -- even if you don't support the
request or when there's an error.

If you can't process the request because of hardware failure
or other error, set the Error bit (bit 15) and put
Device Error Code in the low byte.

abData  data beginning here varies depending upon the request.

See Also: Device Drivers
- -

Device Request Header