Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!unido!rwthinf!cip-s01.informatik.rwth-aachen.de!pmk
From: pmk@cip-s01.informatik.rwth-aachen.de (Michael Keukert)
Newsgroups: comp.lang.pascal
Subject: An answer on executing alien programs within TP
Keywords: Alien Pascal
Message-ID: <1319@rwthinf.UUCP>
Date: 23 Sep 89 20:42:12 GMT
Sender: news@rwthinf.UUCP
Reply-To: pmk@cip-s01.informatik.rwth-aachen.de (Michael Keukert)
Organization: Informatik RWTH Aachen
Lines: 22

In Turbo-Pascal 5.0 all you need are the following lines:
 
 In the beginning of the Program, set the line>
 {$M x,z,y}
 where X is the stack and z,y are the heap-start and the heap-end.
 In an application of mine I used for example {$M 51200,0,0}.
 More Information in the Borland-Handbook.
  
 When you`re going to start your external program, write the lines>

 SwapVectors;
 Exec(GetEnv(`COMSPEC`),`[complete path & filename + extension]`);
 SwapVectors;

 With this few lines you`re able to start whatever external program
 you like. The only thing to do is to experiment a bit with the first
 argument in the {$M x,z,y} compiler instruction.
  
Good luck ...
PMK@CIP-S01.INFORMATIK.RWTH-AACHEN.DE     ! Warning! UNIX-Newcomer!
Michael Keukert of 2:242/2 (Fido-Net)     ! No flames please .... 
PMK@EIKO.ZER           (Zerberus-Net)     ! ... I'm still learning.