Message-Id: <200005020750.JAA29985@cerbere.u-strasbg.fr> X-Sender: muller AT ics DOT u-strasbg DOT fr X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0.2 Date: Tue, 02 May 2000 09:36:57 +0200 To: djgpp-workers AT delorie DOT com From: Pierre Muller Subject: Re: interrupt 0x75 limitation in Win95 ? References: <200004271332 DOT PAA01783 AT cerbere DOT u-strasbg DOT fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp-workers AT delorie DOT com At 12:03 01/05/00 +0300, you wrote: > >On Thu, 27 Apr 2000, Pierre Muller wrote: > >> When I run a simple code that creates a FPU exception by a >> >> j:=j/e; >> >> where j and e are double and e has 0.0 value; >> >> I get a nice FPU exception, >> but if I redirect the output of this code using DJGPP redir executable >> it does not work anymore :( >> >> The exception seems to be sent to the redir executable rather than to the >> correct executable ! > >Yes, it looks like Windows doesn't support FP exceptions in nested >DPMI programs; the exception seems to be delivered to the parent >instead. > >If the parent program is a 16-bit real-mode program or COMMAND.COM, >the FP exception does happen in the program that divides by zero, but >if COMMAND.COM is invoked from a DJGPP program, the exception is also >lost. If the exceptions are not disabled by a call to djgpp_exception_toggle before calling COMMAND.COM then the first DJGPP program recieves the exception ! This Win95 limitation can be important for programs using C++ exceptions !! I think that it should be added in the FAQ with the other DPMI specific limitations ! There is probably a way to overcome this limitation but it requires to hook int 0x31 to catch the set_pm_interrupt for interrupt 0x75 and to redispatch the pseudo-exception according to the %cs in the exception address. Note that I did not test this, so it might not work. Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller AT ics DOT u-strasbg DOT fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99