Posted: Sun Mar 11, 2012 11:49 am Post subject: Floating point value (FPU)
I need to store a double value in to an address.
I've been suggested to:
Code:
mov [eax],first part //Write Double
mov [eax+4],second part //Write Double
It works but it's not what I'm looking for, so I've changed it in to this:
Code:
fld [double_value] //Push in TOS (FPU) value of double_value
fstp [eax] //Pop from TOS (FPU) value of double_value and store value of double_value into eax
//the result will be [eax] = first part of double_value
//[eax+4] = second part of double_value
This also works, but it doesn't store just everything, I'll make an example:
value to write (IN FPU)
4040000040400000
value stored
4040000040400000
------------------------
value to write (IN FPU)
4040ABCD4040EF12
value stored
404000004040EF12
------------------------
How can i fix that ?
What am I doing wrong ? _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum