Obtaining Current Drive Information with Microsoft Basic (62213)
The information in this article applies to:
- Microsoft Visual Basic for MS-DOS
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System for MS-DOS 7.0
- Microsoft Basic Professional Development System for MS-DOS 7.1
This article was previously published under Q62213 SUMMARY
Basic programs can call MS-DOS Interrupt 21h, function 19h to get the
currently selected drive. Before calling this interrupt, AH (the upper
byte of the AX register) must be set to 19h. The interrupt returns the
number of the current drive in AL (the lower byte of the AX register).
The drive numbers correspond to the letters of the alphabet (for
example, 0 = A, 1 = B, etc.).
The information in this article is also included in the Help file
provided with the Standard and Professional Editions of Microsoft
Visual Basic for MS-DOS, version 1.0.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB62213 |
---|
|