Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3D396078.11E91027@phekda.freeserve.co.uk> Date: Sat, 20 Jul 2002 14:07:04 +0100 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: unixy sbrk and win2k References: <10206100232 DOT AA17839 AT clio DOT rice DOT edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Charles Sandmann wrote: > The following patch to crt0.S seems to have fixed the problem: > > *** crt0.BAK Sun Jun 9 20:14:46 2002 > --- crt0.S Sun Jun 9 20:21:48 2002 > *************** brk_common: > *** 475,478 **** > --- 475,479 ---- > movw $0x0900, %ax /* disable interrupts */ > int $0x31 > + cli > pushl %eax > > > (Line numbers are vs 2.03, but it's just a single line insertion). This > should be a no op - since the previous line disables and stores the > previous state in AX; we then restore (enable) them with an equivalent call. > > Under Win2K the get interrupt state DPMI call shows the program starts > with interrupts disabled (but they aren't) - the cli above seems to > fix win2K's bad behavior when moving the arena but does not break > win95 for example. > > Any comments? We ought to try and build something substantial (like > emacs) with this fix above to crt0 and see if there is joy in W2K land > again. > > I can't see how this above could break anything. Unfortunately Emacs seems to bomb out (itself + bash session) under Windows NT 4, when executing this 'cli' instruction. I'm using month-old(ish) Emacs CVS built against month-old(ish) DJGPP CVS with the above patch. I'm running Windows NT 4 + SP5 under VMware 3.1. Bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]