View previous topic :: View next topic |
Author |
Message |
Twistedfate Expert Cheater Reputation: 1
Joined: 11 Mar 2016 Posts: 231
|
Posted: Tue Jan 02, 2018 11:50 am Post subject: pushfq.. Help me to understand ? |
|
|
command pushfq
PUSHes (saves) the RFLAGS register (64 bit) onto the stack.
Note: Only available in 64 bit mode.
Does that mean the command work only on windows System 64 bit and will not work on 32 bit Systems ?
or mean if the game registers was like eax,ecx 32 bit registers will not work and the command works only for 64 bit registers liker rax,rcx ?
If it was the first answer could I compile different instructions for different windows modes like using pushfq for 64x mode and pushad for 32x or they can be used in the same code ?
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Tue Jan 02, 2018 1:14 pm Post subject: |
|
|
It means it is only available in a 64 bit process running in a 64 bit environment.
So if you have access to the 64 bit registries (RAX, R14, ...) then you are in 64 bit mode, and the flags registry will be 64 bits. And PUSHFD (32 bit push) gets replaced by PUSHFQ (64 bit push).
_________________
|
|
Back to top |
|
|
SunBeam I post too much Reputation: 65
Joined: 25 Feb 2005 Posts: 4022 Location: Romania
|
Posted: Fri Jan 26, 2018 2:23 am Post subject: |
|
|
Sadly, there's no PUSHAD (say PUSHAQ) to store/restore all R64
|
|
Back to top |
|
|
Csimbi I post too much Reputation: 94
Joined: 14 Jul 2007 Posts: 3110
|
Posted: Wed Feb 07, 2018 8:58 am Post subject: |
|
|
SunBeam wrote: | Sadly, there's no PUSHAD (say PUSHAQ) to store/restore all R64 |
I wonder if it could be implemented as a "standard macro" that ships with CE so CE would auto-translate like so:
Code: | pushaq:
push rax
push rcx
push rdx
push rbx
push rsp
push rbp
push rsi
push rdi
pushaqa:
push rax
push rcx
push rdx
push rbx
push rsp
push rbp
push rsi
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
|
Including POP the other way around.
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
|
Back to top |
|
|
Csimbi I post too much Reputation: 94
Joined: 14 Jul 2007 Posts: 3110
|
Posted: Wed Feb 07, 2018 9:26 am Post subject: |
|
|
Right, I could.
But it would be useless to anyone using my scripts; it needs to ship with CE.
PUSHFQ is an x64 command, and does what the first post said.
I reacted for Sun's comment, as you can see, it is quoted.
Last edited by Csimbi on Wed Feb 07, 2018 9:29 am; edited 1 time in total |
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Wed Feb 07, 2018 9:28 am Post subject: |
|
|
Just put the Lua code registering the command in the table Lua on any tables you make using it.
_________________
|
|
Back to top |
|
|
|