I have the following line in an assembler code:
XOR EAX, EBX
So, then I've searched a little bit and found out that XOR represents a "swap algorithm". You can read it here: http://en.wikipedia.org/wiki/XOR_swap_algorithm
But when I look in register window of ollydbg, then I have the following
EAX = 00000068
EBX = 0000003B
Now, after the line the register window says
EAX = 000000053
EBX = 0000003B
But from that what I have read in wikipedia article I would expect the following
EAX = 0000003B
EBX = 00000053
At the end, i can say that a normal XOR operation is performed because:
0111011 =>EAX=0000003B
1101000 =>EBX=00000068
-------
1010011 =>EAX=00000053
So my question would be why the swap algorithm is not performed. Or in other words: When can I expect the swap algorithm?
xchg
, notxor