home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / hardcnt.c < prev    next >
C/C++ Source or Header  |  1993-10-14  |  1KB  |  57 lines

  1. /*
  2.  * File......: HARDCNT.C
  3.  * Author....: Dave Pearson
  4.  * BBS.......: The Dark Knight Returns
  5.  * Net/Node..: 050/069
  6.  * User Name.: Dave Pearson
  7.  * Date......: $Date$
  8.  * Revision..: $Revision$
  9.  * Log file..: $Logfile$
  10.  *
  11.  * This is an original work by Dave Pearson and is placed in the public
  12.  * domain.
  13.  *
  14.  * Modification history:
  15.  * ---------------------
  16.  *
  17.  * $Log$
  18.  *
  19.  */
  20.  
  21. // NOTE: This code has been written for and compiled with Borland C++
  22. //       Version 3.1
  23. //
  24.  
  25. #include <extend.h>
  26.  
  27. /*  $DOC$
  28.  *  $FUNCNAME$
  29.  *      GT_HARDCNT()
  30.  *  $CATEGORY$
  31.  *      Disk Drive
  32.  *  $ONELINER$
  33.  *      Return a count of the hard drives on a system.
  34.  *  $SYNTAX$
  35.  *      GT_HardCnt() --> nNumberOfDrives
  36.  *  $ARGUMENTS$
  37.  *      None.
  38.  *  $RETURNS$
  39.  *      The number of physical hard drives fitted to a machine.
  40.  *  $DESCRIPTION$
  41.  *      GT_HardCnt() can be used to check the number of hard drives fitted
  42.  *      to a computer system.
  43.  *  $EXAMPLES$
  44.  *      ? "Hard drives on this system =",GT_HardCnt()
  45.  *  $SEEALSO$
  46.  *      GT_FLOPCNT()
  47.  *  $END$
  48.  */
  49.  
  50. CLIPPER GT_HardCnt()
  51. {
  52.         asm     Mov     AH,08h
  53.         asm     Mov     DL,80h
  54.         asm     Int     13h
  55.         _retni(_AH == 1 ? 0 : _DL);
  56. }
  57.