[comp.lang.pascal] I have the source code for every program ever... PERFECTLY FREE

wpohl@hvrunix.UUCP (Walter E. Pohl) (07/07/88)

	I've been having a problem with Turbo Pascal (v 3 something).
	I have program A chain to program B, and then program B chain to
program A.  (in theory)
	What happens, is that when it chains from A to B, it crashes before
it starts B.  But, it chains from B to A with no trouble, AND (wait there's
more), once it chains from B to A, and I tell it to chain back to B, IT WORKS...

					Walt
					rutgers!cbmvax!vu-vlsi!hvrunix!wpohl

toma@killer.UUCP (Tom Armistead) (07/08/88)

in article <432@hvrunix.UUCP>, wpohl@hvrunix.UUCP (Walter E. Pohl) says:
> Xref: killer comp.lang.pascal:995 comp.sys.ibm.pc:19201
> 	I've been having a problem with Turbo Pascal (v 3 something).
> 	I have program A chain to program B, and then program B chain to
> program A.  (in theory)
> 	What happens, is that when it chains from A to B, it crashes before
> it starts B.  But, it chains from B to A with no trouble, AND (wait there's
> more), once it chains from B to A, and I tell it to chain back to B, IT WORKS...

Your problem is most likely Data and Code segment sizes. When you chain from
one pgm to another, the parent pgm must hav his code and data segments large
enough to encompass the child (the chainee). This would be whi it would work
one way but not the other. When you chain from on program to the next, the
Code and Data segment sizes of the chaining program do not change. One easy
to fix problems here is to always use MAXIMUMs for the Code and Data segments
when compiling anything...

Hope this helps...
Tom

-- 
-------------
Tom Armistead
UUCP:  ...!att | ...!ihnp4 | ...!ames | ...!decwrl | ...!mit-eddie
				!killer!toma