home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / S12334.ZIP / GETDRIVE.BAS < prev    next >
BASIC Source File  |  1989-03-23  |  344b  |  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.