home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / dos / prg / sphinx / examples / other / envstr.c__ < prev    next >
Encoding:
Text File  |  1993-04-30  |  521 b   |  21 lines

  1. /*
  2.     ENVSTR.C-- 
  3. */
  4.  
  5. ?include "DOS.H--"    // get procedure definition for ENVSTR
  6. ?include "WRITE.H--"  // get procedure definition for WRITE and WRITESTR
  7.  
  8.  
  9. main ()
  10. {
  11. WRITESTR("Environment variable COMSPEC is currently:\n");
  12. WRITE('"');
  13. ENVSTR("COMSPEC");  /* string returned in ES:DI */
  14. $ PUSH DS           /* save DS */
  15. DS = ES;            /* set DS to ES */
  16. WRITESTR(DI);       /* use offset in DI to print the string */
  17. $ POP DS            /* restore DS */
  18. WRITE('"');
  19. }
  20.  
  21. /* end of ENVSTR.C-- */