Mail Archives: djgpp-workers/2000/05/02/02:43:04
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
- Raw text -