Mail Archives: djgpp/1995/02/07/15:49:26
> I haven't seen any replies posted, so, with much trepidation, I decided
> to take a look at this problem.
> I thought the ANSI standard signal() function might be a good approach,
This is available in V2, but still in this case would not be the
answer probably. You will get control, but trying to interpet the
current FPU state and executing instruction will drive you crazy.
> That leaves assembly language, and modifying the FPU contol word to mask
> off certain exceptions, including divide by zero and whatever other
> conditions could result in a NaN. Then no exceptions will be generated.
This is probably the correct answer. As a matter of fact, the default state
is all masked, but GO32 sets the current mask in the 80387 detection routine.
This can be done with a simple inline assembler call, but I don't have any
X87 doc here now.
- Raw text -