View previous topic :: View next topic |
Author |
Message |
kitesan Expert Cheater Reputation: 0
Joined: 01 May 2014 Posts: 124
|
Posted: Fri Aug 22, 2014 9:01 am Post subject: how to mov a double value? |
|
|
how to mov a double value in a pointer like [eax+14] ?
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Fri Aug 22, 2014 9:11 am Post subject: |
|
|
Constant value? In 32bit process? Like this:
Code: | myValue:
dq (double)1500.35
newmem:
...
...
...
push ebx
mov ebx,[myValue]
mov [eax+14],ebx
mov ebx,[myValue+4]
mov [eax+18],ebx
pop ebx
...
... |
other method:
Code: | fld qword ptr [myValue]
fstp qword ptr [eax+14] |
There are many other methods.
_________________
|
|
Back to top |
|
|
kitesan Expert Cheater Reputation: 0
Joined: 01 May 2014 Posts: 124
|
Posted: Fri Aug 22, 2014 9:29 am Post subject: |
|
|
i tryed this
myValue:
dq (double)1000.00
newmem:
push ebx
mov ebx,[myValue]
mov [eax+14],ebx
but it movs 0.00 in the pointer
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Fri Aug 22, 2014 9:32 am Post subject: |
|
|
You need all four lines:
Code: | mov ebx,[myValue]
mov [eax+14],ebx
mov ebx,[myValue+4]
mov [eax+18],ebx |
_________________
|
|
Back to top |
|
|
Xathan Advanced Cheater Reputation: 1
Joined: 19 Jun 2014 Posts: 72
|
Posted: Fri Aug 22, 2014 9:34 am Post subject: |
|
|
You need to do it twice, as stated:
Code: | mov ebx,[myValue]
mov [eax+14],ebx
mov ebx,[myValue+4]
mov [eax+18],ebx |
So your pointer is incomplete.
|
|
Back to top |
|
|
kitesan Expert Cheater Reputation: 0
Joined: 01 May 2014 Posts: 124
|
Posted: Fri Aug 22, 2014 10:10 am Post subject: |
|
|
Great! thanks!
|
|
Back to top |
|
|
omoe Grandmaster Cheater Reputation: 8
Joined: 11 Jun 2013 Posts: 547
|
Posted: Thu Aug 28, 2014 3:38 pm Post subject: |
|
|
You could also use the following
fld qword ptr[d9999]
fstp qword ptr[eax+14]
d9999:
dq (double)9999
_________________
Hey! , Rep++ . |
|
Back to top |
|
|
|