Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Interrupts & Ports - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

        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

See Also: INT 21h, 440Fh

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