Device Request 18H: Set Logical Device
Tells the block-device driver that a particular unit number will be
referred to by a particular drive ID number. This is in support for DOS's
"phantom floppy" feature.
Offset Size Contents
▀▀▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
+0 1 bLen 0dH (length of this request packet)
+1 1 bUnitNo unit number
+2 1 bCmd 17H (command code)
+3 2 rStatus OUTPUT: Device Status Word must fill before exit
+5H 8 res (reserved)
13 size of this structure
bUnitNo On entry, this identifies how DOS will refer to this unit at
the user-interface level.
It is zero-based, relative to the number of logical drives
supported by the driver. For instance, if the driver supports
two diskette drives (A and B) but only one physical diskette
drive is present, then a call with bUnitNo=1 means that the
physical drive will be referred to as drive B.
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
Notes: ■ Only device drivers capable of handling Get/Set Logical drive
requests need support this (see Device Attribute bit 6).
■ The "phantom floppy" concept lets DOS pretend (for instance)
that a one-diskette-drive system actually has a drive A and a
drive B. For instance, if the user types: Dir B:, then DOS
prompts the user to "Insert diskette for drive B:" and sends
DvRq 18H (set logical device) to the driver.
■ This is the device driver "catch point" for DOS fn 440fH (IOCTL
set logical drive).
See Also: Device Requests
Installable Device Drivers