home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / section5 / fxn19h.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  939 b   |  18 lines

  1.         ;************************************************************;
  2.         ;                                                            ;
  3.         ;           Function 19H: Get Current Disk                   ;
  4.         ;                                                            ;
  5.         ;           int cur_drive()                                  ;
  6.         ;                                                            ;
  7.         ;           Returns letter of current "logged" disk.         ;
  8.         ;                                                            ;
  9.         ;************************************************************;
  10.  
  11. cProc   cur_drive,PUBLIC
  12. cBegin
  13.         mov     ah,19h          ; Set function code.
  14.         int     21h             ; Get number of logged disk.
  15.         add     al,'A'          ; Convert number to letter.
  16.         cbw                     ; Clear the high byte of return value.
  17. cEnd
  18.