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

  1. /**
  2. *
  3. * Name        FLPUTDTA -- Set the Disk Transfer Area (DTA) location.
  4. *
  5. * Synopsis    flputdta (pdta);
  6. *
  7. *        void far *pdta      Far pointer address for the DTA.
  8. *
  9. * Description    This function sets the Disk Transfer Area (DTA) to the
  10. *        location specified by 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 FLGETDTA to obtain the address of the current DTA.
  16. *
  17. * Returns    None.
  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 flputdta (pdta)
  27. void far *pdta;
  28. {
  29.     union  REGS  regs;
  30.     struct SREGS sregs;
  31.  
  32.         /* Set up registers for "set DTA" function call.    */
  33.     regs.x.ax = 0x1a00;
  34.     sregs.ds  = utseg (pdta);
  35.     regs.x.dx = utoff (pdta);
  36.  
  37.         /* Go set the DTA.                    */
  38.     int86x (FL_DOS_INT, ®s, ®s, &sregs);
  39. }
  40.