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 


Help programing assembler for cheat engine

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
KéKéCoRe
Expert Cheater
Reputation: 0

Joined: 16 Mar 2015
Posts: 101
Location: France - Lorraine - Moselle (57)

PostPosted: Fri Mar 03, 2017 5:40 pm    Post subject: Help programing assembler for cheat engine Reply with quote

Hello everybody!

Here, I have a question! For a script.

I know in the script assembler on cheat engine.
That functions:
Add: Used to add.
Inc : Used to decrease.

But I would like to know how one says equal in function assembler.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Fri Mar 03, 2017 11:06 pm    Post subject: Reply with quote

Code:

add [esi],0 // To add
sub [esi],0 // To subtract
mov [esi],0 // To assign
inc [esi] // To increase by 1
dec [esi] // To decrease by 1

These are some of the basic commands.

Can't post links:

https://www.tutorialspoint.com/assembly_programming/assembly_arithmetic_instructions.htm
http://www.asmpedia.org/index.php?title=Main_Page

Mod Edit: Links fixed and clickable.

_________________
Back to top
View user's profile Send private message Visit poster's website
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Mar 03, 2017 11:31 pm    Post subject: Reply with quote

Typically, a conditional jump following some kind of compare:

Code:
cmp [eax+04],64      //compare the value of [eax+04] to 100
je 001204E5          //if equal, jump...
mov [eax+04],64      //...else set the value of [eax+04] to 100


Not sure if that answers your question, though.
Back to top
View user's profile Send private message
KéKéCoRe
Expert Cheater
Reputation: 0

Joined: 16 Mar 2015
Posts: 101
Location: France - Lorraine - Moselle (57)

PostPosted: Tue Mar 07, 2017 2:01 pm    Post subject: Reply with quote

With your two answers, I do not know how to make it always equal.

What I want to do is equally come function.
Example:
Code:

add [esi],0 // To add

add [esi], =100 //Always stay on 100


But I can not do it in the script.
So I think to do such a function
I would have to:
Code:

mov [esi],0 // To assign
mov [eax+04],64
 
mov [esi],100 //This value of this function says to stay at 100
cmp [esi],-100,100,+100 //These values of the function do not stay even if the values are 99, 101, -10..

That would be the kind of thing I'd like to do in this script.
I know that the signs are not taken into account, it is just to make understand what I would like to do more easily.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Mar 07, 2017 2:57 pm    Post subject: Reply with quote

KéKéCoRe wrote:
add [esi], =100 //Always stay on 100
-Just use mov:

Code:
mov [esi],100


This will set the value to 100, always, unless some other instruction is also writing to that address -- then you would need to do the same for that other instruction.
Back to top
View user's profile Send private message
KéKéCoRe
Expert Cheater
Reputation: 0

Joined: 16 Mar 2015
Posts: 101
Location: France - Lorraine - Moselle (57)

PostPosted: Tue Mar 07, 2017 6:25 pm    Post subject: Reply with quote

Thank you so much! I was looking for this for a while, it will help me a lot to do what I want. Thank you so much.

Yes, what makes sense if one instruction and the same! Normal.

Thanks to you both in any case, it also allows me to have more knowledge in this language
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Mar 07, 2017 6:39 pm    Post subject: Reply with quote

By the way:

Code:
mov [esi],100


Will set the value to 100 (hexadecimal), or 256 (decimal). If you want to set the value to 100 (decimal), then you can write it like this:

Code:
mov [esi],#100


or...

Code:
mov [esi],(int)100
Back to top
View user's profile Send private message
KéKéCoRe
Expert Cheater
Reputation: 0

Joined: 16 Mar 2015
Posts: 101
Location: France - Lorraine - Moselle (57)

PostPosted: Tue Mar 07, 2017 6:55 pm    Post subject: Reply with quote

It's probably with what you told me, I'll see her. Even if I would like to have health at 1000 directly. When I just click and the rest ..


 Description:
 Filesize:  79.22 KB
 Viewed:  13953 Time(s)




Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
STN
I post too much
Reputation: 42

Joined: 09 Nov 2005
Posts: 2672

PostPosted: Tue Mar 07, 2017 8:32 pm    Post subject: Reply with quote

1000 is hex for 4096

Use # like Methos suggested

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Mar 08, 2017 1:30 am    Post subject: Reply with quote

Quote:
mov [rbx+790],#1000
Back to top
View user's profile Send private message
KéKéCoRe
Expert Cheater
Reputation: 0

Joined: 16 Mar 2015
Posts: 101
Location: France - Lorraine - Moselle (57)

PostPosted: Wed Mar 08, 2017 7:45 am    Post subject: Reply with quote

Thank you, guys.
Another thing learned
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
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