Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!tgr!Brzozowski@his-phoenix-multics.arpa From: Brzozowski@his-phoenix-multics.arpa Newsgroups: net.micro Subject: Re: DOS EXEC FUNCTION CALL Message-ID: <1267@brl-tgr.ARPA> Date: Thu, 5-Sep-85 18:53:43 EDT Article-I.D.: brl-tgr.1267 Posted: Thu Sep 5 18:53:43 1985 Date-Received: Sun, 8-Sep-85 09:54:28 EDT Sender: news@brl-tgr.ARPA Lines: 15 The basic problem with executing the EXEC call from TURBO is the fact that the interrupt will not guarantee to restore any registers except the CS and the IP. Which means that the data, and stack segments are not through your current segment registers. Which means when you return back to TURBO all your stack and data is garbage. The solution is to push all your necessary registers and then save the SS and SP in a location in your code segment. (I would have tried this on a program I was working on a while back but I didn't have the intestinal fortitude to write such a thing in inline code...) Good luck! Gary Brz... (Brzozowski%pco@CISL-SERVICE-MULTICS)