home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / gt_curdr.prg < prev    next >
Text File  |  1993-10-13  |  1KB  |  49 lines

  1. /*
  2.  * File......: GT_CURDR.PRG
  3.  * Author....: Allen Bullen
  4.  * BBS.......: The Dark Knight Returns
  5.  * Net/Node..: WTF Is This ?
  6.  * User Name.: Allen Bullen
  7.  * Date......: 21/09/93
  8.  * Revision..: 1.0
  9.  *
  10.  * This is an original work by Allen Bullen and is placed in the public
  11.  * domain.
  12.  *
  13.  * Modification history:
  14.  * ---------------------
  15.  *
  16.  * $Log$
  17.  *
  18.  */
  19.  
  20. /*  $DOC$
  21.  *  $FUNCNAME$
  22.  *      GT_CURDRIVE()
  23.  *  $CATEGORY$
  24.  *      Disk Drive
  25.  *  $ONELINER$
  26.  *      Retreive The Current Drive Letter
  27.  *  $SYNTAX$
  28.  *      GT_CURDRIVE()
  29.  *  $ARGUMENTS$
  30.  *      None
  31.  *  $RETURNS$
  32.  *      The Driver Letter Of The Current Drive
  33.  *  $DESCRIPTION$
  34.  *      Calls function 19h (25) of interupt 21h (33) using GT_INT86()
  35.  *  $EXAMPLES$
  36.  *      cDrive := GT_CURDRIVE()
  37.  *  $END$
  38.  */
  39.  
  40.  
  41. #translate makehi( <x> ) => (<x> * (256))
  42. #translate lowbyte( <x> ) => int( <x> % 256 )
  43.  
  44. Function GT_CURDRIVE()
  45.    Local AX:=0,BX:=0,CX:=0,DX:=0,SI:=0,DI:=0,BP:=0,DS:=0,ES:=0
  46.    AX := MakeHi( 25 )
  47.    GT_INT86( 33, @AX,@BX,@CX,@DX,@SI,@DI,@BP,@DS,@ES )
  48. Return CHR( 65+LowByte( AX ) )
  49.