View previous topic :: View next topic |
Author |
Message |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Sat Jan 02, 2016 1:46 am Post subject: What for "XOR" & what is "XOR"? |
|
|
"XOR" what do? And its impact on the game?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Sat Jan 02, 2016 4:04 am Post subject: |
|
|
xor is exclusive or
it's operation will set the destination bit to 1 if one bit is 1 and the other is 0 (not on 1 1 or 0 0. only on 0 1 or 1 0)
it can be used to set a register to 0 (xor by the same value)
to generate an unique value (integrity check)
for encrypting and decrypting data (xor a value and then xor that resul with the same xor key and you'll get the original value back)
and for other general math stuff
_________________
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 |
|
 |
mgostIH Expert Cheater
Reputation: 3
Joined: 01 Jan 2016 Posts: 159
|
Posted: Sat Jan 02, 2016 4:48 am Post subject: XOR |
|
|
Basically, it follows this image bitwise:
www dot cburch dot com/logisim/docs/2.3.0/guide/tutorial/xor-table.png
For values that are stored with multiple bits, the XOR applies for each correspondant bit position.
Example with BYTE obj:
8 xor 9 = 1
Because:
8 = 00001000
9 = 00001001
X = 00000001
And simply, if you xor 2 equal values, the result will be 0.
in asm x86:
Will restore eax to 0, and this operation occupies only 2 bytes.
But, xor in asm x86 changes some comparision flags, so use it only when there aren't cmp in between.
_________________
|
|
Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Sat Jan 02, 2016 5:02 am Post subject: |
|
|
Thanks Dark Byte,mgostIH.
When we use the "XOR" in Auto Assembly?
Do you have specific values for the XOR goes to work?
|
|
Back to top |
|
 |
mgostIH Expert Cheater
Reputation: 3
Joined: 01 Jan 2016 Posts: 159
|
Posted: Sat Jan 02, 2016 5:06 am Post subject: |
|
|
sjl002 wrote: | Thanks .
When we use the "XOR" in Auto Assembly?
Do you have specific values for the XOR goes to work? |
I usually find XOR inside the asm x86 code itself, rather than a CE feature.
The xor in asm x86 works like this:
Code: | xor eax,ebx
xor [pointer],value
xor register,value
xor register, register |
It will put the value of xoring those 2 arguments inside the first argument, so in the example of xor eax,ebx it will put the value of EAX ^ EBX inside the EAX register.
_________________
|
|
Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Sat Jan 02, 2016 5:13 am Post subject: |
|
|
for example in this games "might & magic" gold, "Angry birds" score
|
|
Back to top |
|
 |
mgostIH Expert Cheater
Reputation: 3
Joined: 01 Jan 2016 Posts: 159
|
Posted: Sat Jan 02, 2016 5:20 am Post subject: |
|
|
sjl002 wrote: | for example in this games "might & magic" gold, "Angry birds" score |
I cannot tell you anything about these games, but XOR is not something game use as a "main feature", it's just the result of compiled code.
If you want to ask anything about those games code, you can search for the function that changes the score for example and paste it here.
_________________
|
|
Back to top |
|
 |
|