Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


What is the Assembly code to define double value?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
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

PostPosted: Sat Jan 20, 2018 2:36 pm    Post subject: What is the Assembly code to define double value? Reply with quote

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
Code:

movsd [edi],xmm1


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
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Sat Jan 20, 2018 3:04 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Sat Jan 20, 2018 3:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Death GOD 7
Expert Cheater
Reputation: 0

Joined: 21 Jan 2017
Posts: 105
Location: Heaven and Hell

PostPosted: Sun Jan 21, 2018 4:14 am    Post subject: Reply with quote

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
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Sun Jan 21, 2018 4:40 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Sun Jan 21, 2018 11:24 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Sun Jan 21, 2018 11:37 am    Post subject: This post has 1 review(s) Reply with quote

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
View user's profile Send private message Visit poster's website
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Sun Jan 21, 2018 11:46 am    Post subject: Reply with quote

Yeah your right I was just thinking wrong. A lest you saw it before it caused problems or confusion.
_________________
Back to top
View user's profile Send private message Visit poster's website
Death GOD 7
Expert Cheater
Reputation: 0

Joined: 21 Jan 2017
Posts: 105
Location: Heaven and Hell

PostPosted: Sun Jan 21, 2018 11:47 am    Post subject: Reply with quote

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
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Sun Jan 21, 2018 11:52 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Death GOD 7
Expert Cheater
Reputation: 0

Joined: 21 Jan 2017
Posts: 105
Location: Heaven and Hell

PostPosted: Sun Jan 21, 2018 11:55 am    Post subject: Reply with quote

Yup it worked but...i would like to learn more about rbx rax thing so that I don't need to ask again and again... Very 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
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Sun Jan 21, 2018 11:58 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Death GOD 7
Expert Cheater
Reputation: 0

Joined: 21 Jan 2017
Posts: 105
Location: Heaven and Hell

PostPosted: Sun Jan 21, 2018 12:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Sun Jan 21, 2018 12:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Death GOD 7
Expert Cheater
Reputation: 0

Joined: 21 Jan 2017
Posts: 105
Location: Heaven and Hell

PostPosted: Sun Jan 21, 2018 12:22 pm    Post subject: Reply with quote

Yeah I know Very Happy it can run both games but the games that are released nowadays mostly runs in 64-Bit Very Happy so.... i am saying i will be messing with 64 bit process mostly..BTW thanks again to both of ya
_________________

"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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites