home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c070 / 4.ddi / TOOLS.4 / TCTSRC1.EXE / FLGETDTA.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-03-31  |  945 b   |  38 lines

  1. /**
  2. *
  3. * Name        FLGETDTA -- Get the Disk Transfer Area (DTA) location.
  4. *
  5. * Synopsis    pdta = flgetdta ();
  6. *
  7. *        void far *pdta      Far pointer to DTA.
  8. *
  9. * Description    This function stores the address of the current Disk
  10. *        Transfer Area (DTA) in *pdta.
  11. *
  12. *        The DTA is used as a data area by many DOS functions.
  13. *        Some functions (such as DOS functions 0x4e and 0x4f) use
  14. *        it for communicating information between function calls.
  15. *        Use FLPUTDTA to set the DTA.
  16. *
  17. * Returns    pdta          Far pointer to current DTA.
  18. *
  19. * Version    6.00 (C)Copyright Blaise Computing Inc.  1983, 1987, 1989
  20. *
  21. **/
  22.  
  23. #include <dos.h>
  24. #include <bfiles.h>
  25.  
  26. void far *flgetdta ()
  27. {
  28.     union  REGS  regs;
  29.     struct SREGS sregs;
  30.  
  31.         /* Set up and do "return DTA" function call.        */
  32.     regs.x.ax  = 0x2f00;
  33.     int86x (FL_DOS_INT, ®s, ®s, &sregs);
  34.  
  35.         /* Return far pointer to DTA.                */
  36.     return uttofaru(sregs.es, regs.x.bx);
  37. }
  38.