When I copy like this :
mov word[esi+edi],0x7FFF
In the file I write it to it is copyed like FF 7F
Why does it do this, or how can I invert it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
NASM didn’t do this. The processor did, because x86 is Little Endian (see endianness).
You could write
mov word[esi+edi],0xFF7Fif you wanted, but I suspect that the code was correct to begin with, only you didn’t take the endianness into account.