home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / pascal / 5284 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.0 KB  |  39 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!gatech!nntp.msstate.edu!Ra.MsState.Edu!dab3
  3. From: dab3@Ra.MsState.Edu (David A. Besancon)
  4. Subject: Re: can't get EXEC to work
  5. Message-ID: <1992Sep10.064707.16903@ra.msstate.edu>
  6. Sender: news@ra.msstate.edu
  7. Nntp-Posting-Host: ra.msstate.edu
  8. Organization: Mississippi State University
  9. References: <2096.2AAB9E17@catpe.alt.za>
  10. Date: Thu, 10 Sep 1992 06:47:07 GMT
  11. Lines: 26
  12.  
  13.  
  14. There are a few errors in your logic...
  15.  
  16. the following should work...
  17.  
  18. { $m 4000,0,0 }             <-- notice the compiler directive.
  19. {^^^^^^^^^^^^^^--- tells the compiler to reserve 16k of stack, and no heap}
  20.  
  21. program test;
  22. uses DOS;
  23. var 
  24.   pname, cmdline : string;
  25. begin
  26.   write ('enter the name of the program to exec.. ');
  27.   readln (pname);
  28.   write ('and the command line arg... ');
  29.   readln (cmdline);
  30.   Swapvectors;                     <--- this is definately a good idesa to run
  31.   exec(pname,cmdline);
  32.   Swapvectors;                     <--- and again after the program call
  33. end.  
  34.  
  35. signed 
  36.  
  37. david besancon---     dab3@ra.msstate.edu
  38.  
  39.