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

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!math.fu-berlin.de!news.uni-stuttgart.de!news.belwue.de!eratu.rz.uni-konstanz.de!nyx.uni-konstanz.de!phfrom
  3. From: phfrom@nyx.uni-konstanz.de (Hartmut Frommert)
  4. Subject: Re: Executaing another program in Turbo pascal...How?
  5. Message-ID: <phfrom.278@nyx.uni-konstanz.de>
  6. Sender: usenet@eratu.rz.uni-konstanz.de
  7. Organization: Dept. of Physics, University of Constance
  8. References: <1992Sep6.131537.16913@access.digex.com>
  9. Distribution: all
  10. Date: Thu, 10 Sep 1992 16:32:31 GMT
  11. Lines: 28
  12.  
  13. jhurwitz@access.digex.com (j. hurwitz) writes:
  14. ..
  15. >Is the Exec procedure supposed to bring up the program you tell it to run?.
  16.  
  17. >How does the command line receive the string from Turbo that executes the 
  18. >program?.
  19.  
  20. Look at your reference guide. In TP 6.0 you should enclose the "Exec" call
  21. in "SwapVectors; Exec(...); SwapVectors;" because TP occupies some interrupt
  22. vectors. Also you should include the "$M" compiler directive to define a
  23. maximal heap size, because otherwise TP reserves all RAM for its heap so
  24. that the prog you call can't be loaded. Moreover, if run in connection with
  25. Novell networks, you must use versions > 2.01-2 of Novell network.
  26.  
  27. All that should be sufficient to run a .EXE or .COM file. If you want to run
  28. a .BAT file, you should pass this as a parameter to COMMAND.COM (or
  29. "GetEnv('ComSpec')" ), i.e.
  30.   Exec(GetEnv('ComSpec'), '/c MyBat.BAT Parm1 Parm2');
  31.  
  32. Hope this helps.
  33. --
  34.  
  35.   
  36.  Hartmut Frommert, Physics, Univ of Constance, | + Whale killing is murder. +
  37.  P.O.Box 55 60, D-W-7750 Konstanz, Germany | + Eat whale killers, not whales.
  38.  E-Mail: <phfrom@nyx.uni-konstanz.de>
  39. +    "Windows NoT" expands in German to "Windows Noch Teurer"
  40. +                                                ^even   ^more expensive
  41.