Author Topic: using floats - what am I doing wrong  (Read 10204 times)

Offline eternalStudent

  • New Member
  • Posts: 1
using floats - what am I doing wrong
« 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


Offline vitsoft

  • Jr. Member
  • *
  • Posts: 17
  • Country: cz
    • About me
Re: using floats - what am I doing wrong
« Reply #1 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 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.