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

  1. /**
  2. *
  3. * Name        flretdta -- Return the Disk Transfer Area (DTA) location
  4. *
  5. * Synopsis    ercode = flretdta(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 stores the address of the current Disk
  11. *        Transfer Area (DTA) in the 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. *        FLSETDTA to set the DTA.)
  18. *
  19. * Returns    ercode          DOS function return code (always 0).
  20. *        (pdta_ads      Current segment and offset of the DTA
  21. *
  22. * Version    3.0  (C)Copyright Blaise Computing Inc.  1983, 1984, 1986
  23. *
  24. **/
  25.  
  26. #include <bfile.h>
  27.  
  28. int flretdta(pdta_ads)
  29. ADS *pdta_ads;
  30. {
  31.     DOSREG dos_reg;
  32.     int    ercode;
  33.  
  34.     dos_reg.ax    = 0x2f00;
  35.     ercode    = dos(&dos_reg);
  36.     pdta_ads->s = dos_reg.es;
  37.     pdta_ads->r = dos_reg.bx;
  38.  
  39.     return(ercode);
  40. }
  41.