i'm new to X86 Assembly programming and i have a few beginner questions i cant seem to find the answer to. I have the following code, that i for the most part, understand:
mov edx,edi
shr edx,1
and edx,0x55555555
sub edi,edx
mov eax,edi
shr edi,0x2
and eax,0x33333333
and edi,0x33333333
add edi,eax
mov eax,edi
shr eax,0x4
add eax,edi
and eax,0xf0f0f0f
imul eax,eax,0x1010101
shr eax,0x18
ret
My questions are, first of all, what value gets put into edx on the first line?
My main question though, is what are the hexadecimal values and what do they do... i converted them to decimal to see if they had any special meaning but they seem to be random hexadecimal values and i don't quite understand what they do.
Last question is, if i have a value in edx and i do:
mov eax,edi
Does this remove the value from edi or does it just make a copy of it and store it in the eax register?
Any help would be appreciated.