Page 1 of 1

Weird messages under Bochs

Posted: Sat Nov 29, 2008 12:42 am
by leledumbo
Why do I get A LOT of
math_abort: MSDOS compatibility FPU exception
under Bochs?
Image to test: http://fpos.googlecode.com/files/fpos.zip

Re: Weird messages under Bochs

Posted: Sat Nov 29, 2008 12:48 am
by OrOS

77 // MSDOS compatibility external interrupt (IRQ13)
78 BX_INFO (("math_abort: MSDOS compatibility FPU exception"));
79 DEV_pic_raise_irq(13);
It looks like your using the development version of Bochs. Your causing an FPU exception, and your apparently not handling it if your OS isn't raising a panic./

Re: Weird messages under Bochs

Posted: Sat Nov 29, 2008 2:06 am
by leledumbo
It looks like your using the development version of Bochs
Is 2.3.7 a development version?
Your causing an FPU exception, and your apparently not handling it if your OS isn't raising a panic
Well... I don't think I've used any floating point thing in my OS. So how could that possible?

Re: Weird messages under Bochs

Posted: Sat Nov 29, 2008 4:39 am
by ru2aqare
leledumbo wrote:
It looks like your using the development version of Bochs
Is 2.3.7 a development version?
Your causing an FPU exception, and your apparently not handling it if your OS isn't raising a panic
Well... I don't think I've used any floating point thing in my OS. So how could that possible?
Or you are raising IRQ14 (are you doing something with the hard disks?) and the PIC is not remapped.

Re: Weird messages under Bochs

Posted: Sun Nov 30, 2008 9:20 am
by Combuster
If its your code, you should seriously consider setting up the FPU properly. Bochs gives you those messages when it is emulating an external FPU (either a 387 or a later processor in backwards compatibility mode). You should set CR0.NE (if I got the name correct) whenever possible to get the standard error handling via exceptions.

In MSDOS compatibility mode, FPU exceptions are routed off the CPU to the PIC and back to the CPU again. It isn't wrong, but isn't the best thing either. (and since its usually in error, Bochs complains about it)