home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 4.ddi / C / FLSETDTA.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  986 b   |  38 lines

  1. /**
  2. *
  3. * Name        flsetdta -- Set the Disk Transfer Area (DTA) location
  4. *
  5. * Synopsis    ercode = flsetdta(pdta_ads);
  6. *
  7. *        int ercode      DOS function return code
  8. *        ADS *pdta_ads      Segment, offset address for the DTA
  9. *
  10. * Description    This function sets the Disk Transfer Area (DTA) to the
  11. *        location specified in the ADS structure pointed to by
  12. *        pdta_ads.
  13. *
  14. *        (The DTA is used as a data area by many DOS functions.
  15. *        Some functions (see DRSFIRST and DRSNEXT) use it for
  16. *        communicating information between function calls.  Use
  17. *        FLRETDTA to obtain the address of the current DTA.)
  18. *
  19. * Returns    ercode          DOS function return code (always 0).
  20. *
  21. * Version    3.0    (C)Copyright Blaise Computing Inc.  1983, 1984, 1986
  22. *
  23. **/
  24.  
  25. #include <bfile.h>
  26.  
  27. int flsetdta(pdta_ads)
  28. ADS *pdta_ads;
  29. {
  30.     DOSREG dos_reg;
  31.  
  32.     dos_reg.ax = 0x1a00;          /* DOS function 0x1A          */
  33.     dos_reg.ds = pdta_ads->s;
  34.     dos_reg.dx = pdta_ads->r;
  35.  
  36.     return(dos(&dos_reg));
  37. }
  38.