NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: eternalStudent on July 03, 2020, 04:33:41 PM

Title: using floats - what am I doing wrong
Post by: eternalStudent on July 03, 2020, 04:33:41 PM
Please help me understand what am I doing wrong. Just trying to load the number 3.2 into a register.

IDE is ebe on Windows 10

(https://i.ibb.co/6NppYN3/float.png)
Title: Re: using floats - what am I doing wrong
Post by: vitsoft on July 06, 2020, 07:25:35 AM
a DD 3.25 assembles as a DD 0x40500000.
I suppose you are wondering why is the contents of XMM1 interpreted as 5.33.
I tried to MOVSS XMM1,[a] in x64dbg (https://x64dbg.com/#start) and XMM1 was loaded with the value 0x00000000_00000000_00000000_40500000 which corresponds to 3.25, exactly as expected.

Float number 5.33 in single precision format would be 0x5C8FAA40. I don't know where did your ebe take that value from.

what am I doing wrong.
Choosing a wrong debugger, I guess.