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 


Auto Assemble - pushad/pushfd equivalent

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
oLaudix
Expert Cheater
Reputation: 3

Joined: 25 Mar 2010
Posts: 138

PostPosted: Sat Jan 31, 2015 1:51 pm    Post subject: Auto Assemble - pushad/pushfd equivalent Reply with quote

I wanted to make AA script with hotkey so i used example from the page:
Code:
pushad
pushfd
push 'X'
call GetAsyncKeyState
shr ax,#15
cmp ax,1
jne notpressed
mov [rcx],#20
notpressed:
popfd
popad

Now, my problem is that it is x64 application so pushad and pushfd are gone. Is there a way to use hotkeys in x64 apps inside AA?
Back to top
View user's profile Send private message
Xblade Of Heaven
Master Cheater
Reputation: 0

Joined: 16 Oct 2005
Posts: 395
Location: DEAD

PostPosted: Sat Jan 31, 2015 3:17 pm    Post subject: Reply with quote

you can try:

Code:

pushfq
push 'X'
call GetAsyncKeyState
shr ax,#15
cmp ax,1
jne notpressed
mov [rcx],#20
notpressed:
popfq



regards

_________________
Welcome to the Hell.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5627

PostPosted: Sat Jan 31, 2015 3:46 pm    Post subject: Reply with quote

This has been answered in some more details in an older topic:

http://forum.cheatengine.org/viewtopic.php?t=574257

_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
oLaudix
Expert Cheater
Reputation: 3

Joined: 25 Mar 2010
Posts: 138

PostPosted: Sat Jan 31, 2015 5:31 pm    Post subject: Reply with quote

Geri wrote:
This has been answered in some more details in an older topic:

http://forum.cheatengine.org/viewtopic.php?t=574257

Thanks that helped a bunch. Guess my problem is mostly with Getasynckeystate not being available for 64x. I think ill just leave it and try something else.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25831
Location: The netherlands

PostPosted: Sat Jan 31, 2015 6:25 pm    Post subject: Reply with quote

it is available, but the calling convention is very different
https://msdn.microsoft.com/en-us/library/ms235286.aspx

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sat Jan 31, 2015 7:45 pm    Post subject: Reply with quote

Code:
push rax
push rbx
push rdx
push rsi
push rdi
push rbp
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
push rcx

mov rcx,'X'
push rcx    // or sub rsp,08
call GetAsyncKeyState
add rsp,08
test ax,8000

pop rcx

jz notpressed
mov [rcx],#20
notpressed:


pop r15
pop r14
pop r13
pop r12
pop r11
pop r10
pop r9
pop r8
pop rbp
pop rdi
pop rsi
pop rdx
pop rbx
pop rax

_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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