Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Have you tried initializing the FPU? I think that maybe that could be causing the problem. Just try putting an finit somewhere in the startup routine of your OS.