home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / qb_pds / qb_lib / getdrv.asm < prev    next >
Encoding:
Assembly Source File  |  1990-04-20  |  885 b   |  40 lines

  1. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. ;
  3. ;    Name :     GetDrv.ASM - A QB4+ FUNCTION which returns the ASC value of the 
  4. ;        current default drive.
  5. ;
  6. ;    Revised :  4/20/90
  7. ;
  8. ;      Notes :    - Under DOS, this interrupt returns the following values -
  9. ;
  10. ;            Drive A: = 0
  11. ;            Drive B: = 1
  12. ;            Drive C: = 2
  13. ;
  14. ;        - This is a QB4+ FUNCTION which returns the ASCII value of
  15. ;        the current default drive, for example - 
  16. ;
  17. ;            Drive A: = 65
  18. ;            Drive B: = 66
  19. ;            Drive C: = 67
  20. ;
  21. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  22.  
  23.     .MODEL    MEDIUM,BASIC
  24.     .CODE
  25.  
  26. GetCurrDrv    proc
  27.  
  28.     mov    AH,19h
  29.     int    21h
  30.  
  31.     add    AL,65            ; Convert drive spec to ASCII value
  32.     xor    AH,AH            ; Zero out the hi byte
  33.  
  34.     ret
  35.  
  36. GetCurrDrv    ENDP
  37.         END
  38.  
  39. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  40.