Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FPU problem

Status
Not open for further replies.

evanmars

Programmer
Jan 20, 2003
4
US
I have this code using masm32:

FLD Temp ;load Temp to FP stack
PrintDec Temp ;DEBUGGER, print value of Temp (256)
FLD Cr ;load Cr to FP stack
FST Temp ;store ST(0) to Temp
PrintDec Temp ;DEBUGGER, print value of Temp (-2)
FMUL ;ST(0) x ST(1)
FST Temp ;store ST(0) to Temp
PrintDec Temp ;DEBUGGER, print value of Temp (-512)

The debug window displays this:

Temp = 256
Temp = -2
Temp = -2

I expected the last Temp to be -512, but it is -2. Where am I going wrong?
 
why dont u just look with sice or ur other favorite debugger?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top