Date: Wed, 14 Oct 1998 12:10:14 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: John Elliott cc: djgpp AT delorie DOT com Subject: Re: Running multiple DJGPP apps from 16-bit In-Reply-To: <908312348.29044.5.nnrp-04.c2de7091@news.demon.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com It might be that I'm the only one who doesn't know what GEM and Desk Accessories are and how do they work, in which case please disregard the rest of my message. But if I'm not the only one who's ignorant, you will need to explain a whole lot more about this setup to get meaningful replies. From the information you've posted I cannot figure out what exactly goes on between GEM, protected-mode DA, and DJGPP. In particular, what are those ``protected-mode applications'' that the desktop starts ``by loading their real-mode stub''? are they DJGPP programs? Also, what exactly does ``in the middle of __dpmi_int() call'' mean? Does GEM catch real-mode interrupts, such as Int 21h? If you explain all these things, I or somebody else here might be able to help you figure out the problems. Maybe just describing in more detail how it works while stating clearly what parts are compiled with DJGPP and what are real-mode programs, is all that's needed to understand the nature of your predicament. And what the heck is that GEM thingy? On Tue, 13 Oct 1998, John Elliott wrote: > I have now managed to write a suitable stub for Desk Accessories. However, > GEM can only run one protected-mode program at a time. If I have a > protected-mode DA loaded, I can't then run a protected-mode app. > > As far as I can see, this is because GEM does context switches in 16 bits, > and tries to load the application while the DA is in the middle of a > __dpmi_int() call. > > - GEM loads a protected-mode DA. > - The DA enters its event loop, and calls GEM with __dpmi_int(). > - Since the DA's event queue is empty, GEM switches context to its desktop. > - The desktop starts a protected-mode application, by loading its real-mode > stub (INT 21 AH=4Bh) > > Using CWSDPMI, I get a crash when the application starts. Using the DRDOS > DPMI host (7.03), I get a crash when the application terminates. > > Am I trying something completely impossible here, or is there any way to > get round this?