From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) Message-Id: <9902171404.AA12410@clio.rice.edu> Subject: Re: Passing FLAGS from RMCBs To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) Date: Wed, 17 Feb 1999 08:04:38 -0600 (CST) Cc: dj AT delorie DOT com, djgpp-workers AT delorie DOT com In-Reply-To: from "Eli Zaretskii" at Feb 17, 99 09:26:56 am X-Mailer: ELM [version 2.4 PL20] Content-Type: text Reply-To: djgpp-workers AT delorie DOT com > Somebody complained on c.o.m.d. that the flags set in an RMCB don't > get reflected back to the real-mode. > It turns out the wrapper set up by gormcb.c overwrites the flags in > the real-mode call structure with its original value (taken from the > real-mode stack). > I'm guessing that this was done for safety reasons (e.g., imagine that > the user code messes with the flags and sets, say, the V86 flag > there ;-). Is that the only reason? No, the reason is probably that it was an oversight or easier to program this way. This was contributed by Ardi in the early Executor days (djgpp v1.x) but they never used it - it was replaced by their own custom assembler from what I remember. The wrappers also suffer from bad stack management among other things and have always needed some TLC - but writing self modifying code has always been a bit of a challenge....