home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c065 / 2.ddi / CLIB2.ZIP / GETDTA.CAS < prev    next >
Encoding:
Text File  |  1990-06-07  |  1.9 KB  |  54 lines

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