[comp.lang.pascal] A test posting..and a question

dan@datastar.UUCP (Dan Chaney) (07/07/88)

Hello.

  Given the recent question over chaining, I have some questions over
the use of the execute command.  Specifically, I have had several problems
trying to call a TP3 compiled program from another one (not recursively).
In fact, sleeping the machine is the result more often than not.  The
programs (sorry, ask me for the source later - I don't have it here) are
pretty easy.  The caller simply

     Assign(Filetype,'CSEG.COM');
     Execute(Filetype);
     Writeln('Welcome back to the real world');


     Now, this is all well and good.  The call completes and CSEG is run.
     What doesn't happen is that CSEG doesn't go back to the original
     program.

     Oh, CSEG.COM, by the way, is a program that sets an absolute integer
     at Cseg:$80 and alledgedly tells you whether or not the program
     currently in execution was called from DOS or another program.  This
     is vaguely referred to in the manual around the Chain/Execute areas.
     A value of < 127 means a DOS-level call, higher means from a program.

Summary questions : (1) Has anyone had success returning to the calling
                        program using an execute().  Chaining is not feasible.
                    (2) Has anyone had reliable results using the Cseg:$80
                        check from initial execution point?  I am getting
                        0's, 3083's, 125's and even -4512's and stuff.

Thanks for any info and I will post the problem-code if it is necc.


---
---  Dan Chaney  (or someone that closely resembles him...sorta...I think)
---  {uunet,rutgers}!ukma![dans,datastar].uucp!(accno)  EXT698@UKCC.BITNET
---  Wanted : A Sniglet for people that use hand gestures when speaking to
---           the order speaker at drive thru windows. (chaney@ms.uky.edu)