home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 1.ddi / CLIBSRC1.ZIP / GETDTA.CAS < prev    next >
Encoding:
Text File  |  1992-06-10  |  1.6 KB  |  53 lines

  1. /*---------------------------------------------------------------------------
  2.  * filename - getdta.cas
  3.  *
  4.  * function(s)
  5.  *        getdta - gets disk transfer address
  6.  *--------------------------------------------------------------------------*/
  7.  
  8. /*
  9.  *      C/C++ Run Time Library - Version 5.0
  10.  *
  11.  *      Copyright (c) 1987, 1992 by Borland International
  12.  *      All Rights Reserved.
  13.  *
  14.  */
  15.  
  16.  
  17. #pragma inline
  18. #include <dos.h>
  19.  
  20. /*--------------------------------------------------------------------------*
  21.  
  22. Name            getdta - gets disk transfer address
  23.  
  24. Usage           char far *getdta(void);
  25.  
  26. Related
  27. functions usage void setdta(char far *dta);
  28.  
  29. Prototype in    dos.h
  30.  
  31. Description     getdta returns the current setting of the disk
  32.                 transfer address (DTA).
  33.  
  34.                 In the small and medium memory models, it is assumed that the
  35.                 segment is the current data segment. If C is used exclusively,
  36.                 this will be the case, but assembly routines may set the disk
  37.                 transfer address to any hardware address.
  38.  
  39.                 In the compact, large, or huge memory models, the address
  40.                 returned by getdta is the correct hardware address and may be
  41.                 located outside the program.
  42.  
  43. Return value    getdta returns a pointer to the current disk
  44.                 transfer address.
  45.  
  46. *---------------------------------------------------------------------------*/
  47. char far *getdta(void)
  48. {
  49. asm     mov     ah, 02Fh
  50. asm     int     021H
  51.         return (char _es *) _BX;
  52. }
  53.