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 


ASM help
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
annunaki
How do I cheat?
Reputation: 0

Joined: 31 Oct 2009
Posts: 2

PostPosted: Sat Oct 31, 2009 3:23 am    Post subject: ASM help Reply with quote

Trying to write a script in CE so it inserts a floating point number into a register. For example, I'd like to insert .2 into eax, how could this be done? Thank you.
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sat Oct 31, 2009 5:10 am    Post subject: Reply with quote

Look at FSTP, bear in mind that floating point uses another set of registers
Back to top
View user's profile Send private message
NoMercy
Master Cheater
Reputation: 1

Joined: 09 Feb 2009
Posts: 289

PostPosted: Sat Oct 31, 2009 5:31 am    Post subject: Reply with quote

Code:
_asm
       
{mov eax, 0x01
}
Back to top
View user's profile Send private message
annunaki
How do I cheat?
Reputation: 0

Joined: 31 Oct 2009
Posts: 2

PostPosted: Sat Oct 31, 2009 9:58 am    Post subject: Reply with quote

NoMercy wrote:
Code:
_asm
       
{mov eax, 0x01
}


In Cheat Engine auto assemble, mov eax, 0x01 won't compile =/, and I'm not exactly sure how to use FSTP, farther assistance would be very appreciated please, thank you.
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sat Oct 31, 2009 12:13 pm    Post subject: Reply with quote

Read this: http://webster.cs.ucr.edu/AoA/DOS/ch14/CH14-4.html
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
DoomsDay
Grandmaster Cheater
Reputation: 0

Joined: 06 Jan 2007
Posts: 768
Location: %HomePath%

PostPosted: Sat Oct 31, 2009 12:26 pm    Post subject: Reply with quote

Code:
sub esp,8               ;make room in the stack
fstp qword ptr [esp]    ;fill with the curren value
push 1                  ;push the number to be converted
fild dword ptr [esp]    ;load 1.0
mov dword ptr [esp],5   ;
fidiv dword ptr [esp]   ;1/5 = .2
fstp dword ptr [esp]    ;unload to the stack
pop eax                 ;result goes to eax
fld qword ptr [esp]     ;reload the original value
add esp,8               ;adjust the stack


Last edited by DoomsDay on Sun Nov 01, 2009 2:05 am; edited 1 time in total
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sat Oct 31, 2009 1:42 pm    Post subject: Reply with quote

NoMercy wrote:
Code:
_asm
       
{mov eax, 0x01
}


Code:

__asm {
      xor eax, eax
      inc eax
}
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Oct 31, 2009 2:09 pm    Post subject: Reply with quote

&Vage wrote:
NoMercy wrote:
Code:
_asm
       
{mov eax, 0x01
}


Code:

__asm {
      xor eax, eax
      inc eax
}


i doubt this is actually an improvement
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sat Oct 31, 2009 2:14 pm    Post subject: Reply with quote

slovach wrote:
&Vage wrote:
NoMercy wrote:
Code:
_asm
       
{mov eax, 0x01
}


Code:

__asm {
      xor eax, eax
      inc eax
}


i doubt this is actually an improvement
Never it said kthx.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Oct 31, 2009 4:28 pm    Post subject: Reply with quote

so uh, what was the point other than to make it more complicated?
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sat Oct 31, 2009 5:04 pm    Post subject: Reply with quote

slovach wrote:
so uh, what was the point other than to make it more complicated?
No point, so whats the point of trying to point it out?
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sat Oct 31, 2009 5:57 pm    Post subject: Reply with quote

&Vage wrote:
slovach wrote:
so uh, what was the point other than to make it more complicated?
No point, so whats the point of trying to point it out?


Then why post in the first place?
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sat Oct 31, 2009 7:26 pm    Post subject: Reply with quote

Athaem wrote:
&Vage wrote:
slovach wrote:
so uh, what was the point other than to make it more complicated?
No point, so whats the point of trying to point it out?


Then why post in the first place?
Oh, I'm sorry I didn't know there was a rule against posting it... Oh.. wait, there isn't Smile
Back to top
View user's profile Send private message
FullyAwesome
I post too much
Reputation: 0

Joined: 05 Apr 2007
Posts: 4438
Location: Land Down Under

PostPosted: Sat Oct 31, 2009 8:46 pm    Post subject: Reply with quote

&Vage wrote:
Oh, I'm sorry I didn't know there was a rule against posting it... Oh.. wait, there isn't Smile


Code:
Do not make useless posts or unrelated topics. Before you post, think if you are actually contributing something to the discussion in one way or another. If you do not think you are, do not post.

_________________
Back to top
View user's profile Send private message MSN Messenger
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sat Oct 31, 2009 8:52 pm    Post subject: Reply with quote

FullyAwesome wrote:
&Vage wrote:
Oh, I'm sorry I didn't know there was a rule against posting it... Oh.. wait, there isn't Smile


Code:
Do not make useless posts or unrelated topics. Before you post, think if you are actually contributing something to the discussion in one way or another. If you do not think you are, do not post.
It's not useless, OP might not know another way. Un-efficient or not I contributed something weather you're going to be a big vage or not. You.. on the other hand should be warned since you post something that is not relevant to the thread Smile
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 programming 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