[SOLVED] Conversion exception
Posted: Tue Jul 16, 2013 7:38 am
Hi all.
I have specific problem: somewhere in my code there's something that causes FPU exception when converting. It doesn't matter what am I converting or to what is it being converted, it just causes exception.
Few examples of my conversions:
Whenever I try to do something with resulting value (for example when I compare it), another exception is thrown. I'm using bochs and I don't know how to debug which exception has been thrown, because exception doesn't stop execution. I think that raw content of stack is 0 (I tried to print it), but I'm not sure.
Does anybody have any idea what can cause such behaivor when converting? Is there any way for stopping it? I have read something about exception masking in control word, but converted value will be still incorrect, won't it?
Please help.
I have specific problem: somewhere in my code there's something that causes FPU exception when converting. It doesn't matter what am I converting or to what is it being converted, it just causes exception.
Code: Select all
math_abort: MSDOS compatibility FPU exception
Code: Select all
;F2D
fld dword [esp]
push eax ;trash (esp+4)
fstp qword [esp]
;F2I
fld qword [esp]
pop eax
fistp dword [esp]
Does anybody have any idea what can cause such behaivor when converting? Is there any way for stopping it? I have read something about exception masking in control word, but converted value will be still incorrect, won't it?
Please help.