I want to implement with inline assembler a function that take the value of eax register and put the result of xor of each 4-bit from eax into ebx, I want to implement it using left shift.
Suppose that the value of
eax value is : 1101.1010.0010.0011
ebx value is : 0
I want to do a left shift of 4-bit from eax and xor the lost value with ebx value:
So the result must be:
eax : 1010.0010.0011.0000
ebx : 1101
Next:
eax : 0010.0011.0000.0000
ebx : 1101 xor 0010 = 1111
Next:
eax : 0011.0000.0000.0000
ebx : 1111 xor 0010 = 1101
Next:
eax : 0000.0000.0000.0000
ebx : 1101 xor 0011 = 1110
How to get the lost value?