Get logical drive (INT 21h, 440Eh)
DOS supports logical drives (fx. on machines with only one floppy
drive, logical drive B is physical drive A). This call can be used
to find the last logical drive, used for a device, so that the
program can ask the user to insert a disk.
Entry:
AX = 440Eh
BL = Drive (A=1, B=2, etc.)
Return:
AL = 0, if no more than one logical drive is assigned to
this device
Otherwise, AL contains the last drive number (A=1, B=2 etc.)
that was used refering to this device.
Example (in pseudo-code, copy a file from A: to B:):
Call check-drive(A:)
Read from drive A
Call check-drive(B:)
Write to drive B
Call check-drive(A:)
Read from drive A
Call check-drive(B:)
Write to drive B
End
Proc check-drive(d)
IOCTL-0Eh, BL=d
IF AL<>d THEN Write on screen: "Insert disk for drive " d
IOCTL-0Fh, BL=d
Endproc