home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 4.ddi / C / DRRETDRV.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  612 b   |  30 lines

  1. /**
  2. *
  3. * Name        drretdrv -- Return the default disk drive
  4. *
  5. * Synopsis    def_drive = drretdrv();
  6. *
  7. *        int def_drive      The default disk drive number
  8. *
  9. * Description    DRRETDRV returns the current default disk drive number.
  10. *        The values are 0 = A:, 1 = B:, etc.
  11. *
  12. * Returns    def_drive      The disk drive number
  13. *
  14. * Version    3.0  (C)Copyright Blaise Computing Inc.  1983, 1984, 1986
  15. *
  16. **/
  17.  
  18. #include <bdirect.h>
  19. #include <butility.h>
  20.  
  21. int drretdrv()
  22. {
  23.     DOSREG dos_reg;
  24.  
  25.     dos_reg.ax = 0x1900;          /* DOS function 0x19          */
  26.     dos(&dos_reg);
  27.  
  28.     return (int) utlobyte(dos_reg.ax);
  29. }
  30.