View previous topic :: View next topic |
Author |
Message |
NanoByte Expert Cheater
Reputation: 1
Joined: 13 Sep 2013 Posts: 222
|
Posted: Fri May 23, 2014 4:29 pm Post subject: check If key is pressed, explain this to me, WouldYouKindly |
|
|
pushad //save all flags i think what ever that is
push 11 //hmm i know that 11 is the nr for the ctrl but why push it?
call GetAsyncKeyState //Does something
shr ax,#15 // shr? ax,#15? share?
cmp ax,1 // compare ax,1
popad //restore flags or restore something
jne exit // jmp
|
|
Back to top |
|
 |
Rissorr Master Cheater
Reputation: 3
Joined: 17 Sep 2013 Posts: 273 Location: Israel!
|
Posted: Fri May 23, 2014 4:48 pm Post subject: |
|
|
i will not much help you but you helped me and i will try to give you what i know
call GetAsyncKeyState
you can read about it by googling: "stackoverflow GetAsyncKeyState"
shr ax,#15
its a logical shift command that stifts ax by #15 to the right
you can read about this by googling: "shr in assembly"
but the flags i just NOT understand them... sry
hope i helped [/i]
|
|
Back to top |
|
 |
NanoByte Expert Cheater
Reputation: 1
Joined: 13 Sep 2013 Posts: 222
|
Posted: Fri May 23, 2014 5:17 pm Post subject: |
|
|
Thx mate
but i want to know why he does the things he does
shr ax,#15 // so he pushed ax bytes 15 times to the right ? if yes why?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25804 Location: The netherlands
|
Posted: Fri May 23, 2014 5:27 pm Post subject: |
|
|
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646293.aspx
Quote: |
If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to GetAsyncKeyState. However, you should not rely on this last behavior; for more information, see the Remarks.
|
It checks if the most significant bit is set. SHORT is a 16 bit value, so bit 15 is the most significant bit
_________________
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 |
|
 |
NanoByte Expert Cheater
Reputation: 1
Joined: 13 Sep 2013 Posts: 222
|
Posted: Sat May 24, 2014 5:00 am Post subject: Holy Shit its darkbyte!! |
|
|
Thanks mate, i get it
|
|
Back to top |
|
 |
Rissorr Master Cheater
Reputation: 3
Joined: 17 Sep 2013 Posts: 273 Location: Israel!
|
Posted: Sat May 24, 2014 6:50 am Post subject: |
|
|
that's complicated for me... -_-
|
|
Back to top |
|
 |
|