hey guys
this is the code fetching player speed
fld dword ptr [esp+04]
fstp dword ptr [ecx+0C]
how can i multiply [esp+04] or [ecx+0C] by value for ex:6 ?
how to multiply an address's value?
-
- Expert Cheater
- Posts: 121
- Joined: Wed Dec 27, 2017 2:40 pm
- Reputation: 64
how to multiply an address's value?
[code=CEA]
label( myFloat )
code:
fld [esp+4] // load [esp+4] into st0 = a
fld [myFloat] // load [myFloat] into st1 = b
fmul st0,st1 // a*b stored in st0
fstp [esp+C] // store result in [esp+C]
myFloat:
dd (float)6.0
[/code]
Also see this: [URL]https://en.wikibooks.org/wiki/X86_Assembly/Floating_Point[/URL]
label( myFloat )
code:
fld [esp+4] // load [esp+4] into st0 = a
fld [myFloat] // load [myFloat] into st1 = b
fmul st0,st1 // a*b stored in st0
fstp [esp+C] // store result in [esp+C]
myFloat:
dd (float)6.0
[/code]
Also see this: [URL]https://en.wikibooks.org/wiki/X86_Assembly/Floating_Point[/URL]
Last edited by SunBeam on Thu Jan 01, 1970 12:00 am, edited 3 times in total.
Who is online
Users browsing this forum: No registered users