Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Assembly (http://www.programmingforums.org/forum20.html)
-   -   Safe code? (http://www.programmingforums.org/showthread.php?t=10047)

Klarre May 29th, 2006 10:56 AM

Safe code?
 
I am using this square root function from within my C++ application. But I am a little bit worried that it might not be totally fail safe. Can it in some way "screw it up" for other applications that uses the FPU at the "same" time? How should I fix it if that's so?

:

.586
.model flat, C

.code

sqrt proc x:DWORD
        fld x
        fsqrt
        ret

sqrt endp

end

Thanks for your help!

/Klarre

SittingDuck Jun 19th, 2006 9:29 AM

Err, well Intel says it's FPU is really reliable. It won't "screw it up" for other applications because the operating system will take care of it - it should save the state of the CPU and FPU before switching to a different application.


All times are GMT -5. The time now is 10:08 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC