home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / msj / msjv4_4 / basic / getdrive.bas < prev    next >
Encoding:
BASIC Source File  |  1989-03-23  |  344 b   |  15 lines

  1. '***** GetDrive.Bas - BASIC function that returns the current drive
  2.  
  3. 'syntax: Drive$ = CHR$(GetDrive%)
  4. ' where: Drive$ is returned as "A", "B", and so forth
  5.  
  6. DEFINT A-Z
  7. DECLARE SUB DosQCurDisk(SEG Drive, SEG DriveMap&)
  8.  
  9. FUNCTION GetDrive%
  10.  
  11.    CALL DosQCurDisk(Drive, DriveMap&)
  12.    GetDrive% = (Drive - 1) + ASC("A")
  13.  
  14. END FUNCTION
  15.