Why does the first code print DCBA and the second ABCD? Is 0x44434241 not equal to DCBA?
mov eax,4
push dword "DCBA"
mov ebx,1
mov ecx,esp
mov edx,4
int 0x80
add esp,4
mov eax,4
push dword 0x44434241
mov ebx,1
mov ecx,esp
mov edx,4
int 0x80
add esp,4
Well, no, and you even managed to find the proof of it 🙂
x86 is little-endian, the
0x44434241numeric value is memory will be stored with 0x41 at the first byte location (lowest byte address), 0x42 at the second, etc.