View previous topic :: View next topic |
Author |
Message |
Death GOD 7 Expert Cheater Reputation: 0
Joined: 21 Jan 2017 Posts: 105 Location: Heaven and Hell
|
Posted: Sat Jan 20, 2018 2:36 pm Post subject: What is the Assembly code to define double value? |
|
|
Hello and thanks for viewing this topic
I know that for 4 byte/integer value you place '#' or blank to define it
but what to do for others like double? I saw in youtube that for float you use (float) so I tried using (double) for double values but it did't seem to work
the code i am trying to change
what i edited
Code: |
mov [edi],(double)6
|
BTW its a health and it is in double and full health is 6....if i do the code it just does like nop....doesn't decrease but stays whatever the value is
I want the hack to give full health as it is activated.HELP?
Did I do anything wrong?
_________________
"If you are good at something,never do it for free"-The Joker
I know you are looking at this post, Hitler |
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1587
|
Posted: Sat Jan 20, 2018 3:04 pm Post subject: |
|
|
Code: | label(maxhealth)
newmem:
fld qword ptr [maxhealth]
fstp qword ptr [edi]
code:
; ...
maxhealth:
dq (double)6.00 |
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sat Jan 20, 2018 3:39 pm Post subject: |
|
|
Code: | mov qword ptr [eax],(double)1 |
Code: | mov qword ptr [rax],(double)1 |
Code: | mov rbx,(double)1
mov [rax],rdx |
_________________
|
|
Back to top |
|
|
Death GOD 7 Expert Cheater Reputation: 0
Joined: 21 Jan 2017 Posts: 105 Location: Heaven and Hell
|
Posted: Sun Jan 21, 2018 4:14 am Post subject: |
|
|
Thanks and what is the function does 2nd and 3rd code peform
and is qword and ptr important?and about rbx,rdx and rax can you please explain
Thanks again
_________________
"If you are good at something,never do it for free"-The Joker
I know you are looking at this post, Hitler |
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1587
|
Posted: Sun Jan 21, 2018 4:40 am Post subject: |
|
|
Tim's Post:
line one & two
available in 64-bit processes.
about the last one, probably a typo
just use any register.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sun Jan 21, 2018 11:24 am Post subject: |
|
|
TheyCallMeTim13 wrote: |
Code: | mov rbx,(double)1
mov [rax],rdx |
|
Sorry that is a typo, by using a 64 bit registry for a source or destination operand this will have it move 64 bits and just saves writing the QWORD PTR part, but this is only in 64 bit mode.
Code: | mov rbx,(double)1
mov [rax],rbx |
Then the first one is mistake on my part.
And the second one is how to use a QWORD in 64 bit mode, when no source or destination registry is used.
EDITED:
For the mistake one the first one.
_________________
Last edited by TheyCallMeTim13 on Sun Jan 21, 2018 11:48 am; edited 1 time in total |
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1587
|
Posted: Sun Jan 21, 2018 11:37 am Post subject: |
|
|
TheyCallMeTim13 wrote: | Then the first one is how to use a QWORD (8 bytes) in 32 bit mode. |
this is not possible, moving a qword value into eax register in 32 bit processes is not accepted.
because it take 8 bytes in memory, which is [eax] and [eax+04] however this is valid in 64 bit processes.
he is running a 32 bit process, then he must use the fpu x87 registers and instructions.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sun Jan 21, 2018 11:46 am Post subject: |
|
|
Yeah your right I was just thinking wrong. A lest you saw it before it caused problems or confusion.
_________________
|
|
Back to top |
|
|
Death GOD 7 Expert Cheater Reputation: 0
Joined: 21 Jan 2017 Posts: 105 Location: Heaven and Hell
|
Posted: Sun Jan 21, 2018 11:47 am Post subject: |
|
|
OldCheatEngineUser wrote: |
he is running a 32 bit process, then he must use the fpu x87 registers and instructions. |
did you mean like this code? like fld which loads and fstp which puts into destination address
Code: |
fld qword ptr [maxhealth]
fstp qword ptr [edi]
|
i understand that code but i couldnt understand rbx and rdx things which i have found in some games. is there any tutorial or guide.....if you could i would be happy
_________________
"If you are good at something,never do it for free"-The Joker
I know you are looking at this post, Hitler |
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sun Jan 21, 2018 11:52 am Post subject: |
|
|
I was just tring to show both with addresses or registries, but the RDX was meant to be RBX.
this is the corrected code:
Code: | mov rbx,(double)1 // this is for 64 bit mode only
mov [rax],rbx |
But if you are working in 32 bit mode just ignore it for now. And use the fpu x87 registers and instructions as OldCheatEngineUser said.
And this looks like it should work to me:
Code: | fld qword ptr [maxhealth]
fstp qword ptr [edi] |
_________________
|
|
Back to top |
|
|
Death GOD 7 Expert Cheater Reputation: 0
Joined: 21 Jan 2017 Posts: 105 Location: Heaven and Hell
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sun Jan 21, 2018 11:58 am Post subject: |
|
|
Those are just 64 bit registries, if you don't have a 64 bit game then you could use the 64 bit CE tutorial just to work a bit with the 64 bit registries.
RAX (64 bits) EAX (lower 32 bits of RAX)
_________________
|
|
Back to top |
|
|
Death GOD 7 Expert Cheater Reputation: 0
Joined: 21 Jan 2017 Posts: 105 Location: Heaven and Hell
|
Posted: Sun Jan 21, 2018 12:04 pm Post subject: |
|
|
actually i am running 64 bit processor so I have installed many 64 bit games but I will mess with 64 bit tutorial..thanks
_________________
"If you are good at something,never do it for free"-The Joker
I know you are looking at this post, Hitler |
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1587
|
Posted: Sun Jan 21, 2018 12:15 pm Post subject: |
|
|
Death GOD 7 wrote: | actually i am running 64 bit processor so I have installed many 64 bit games but I will mess with 64 bit tutorial..thanks |
having a 64 bit processor doesnt mean all your processes are 64 bit, remember 64 bit processor can run 32 bit processes.
the game you were running is 32 bit, otherwise CE wont bother you with compiling errors.
however you can avoid fpu x87 register and instructions, you can work with sse instruction set in 32 bit processes.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
Death GOD 7 Expert Cheater Reputation: 0
Joined: 21 Jan 2017 Posts: 105 Location: Heaven and Hell
|
|
Back to top |
|
|
|