Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我这样复制时:
mov word[esi+edi],0x7FFF
在我写入的文件中,它被复制为 FF 7F
为什么会这样做,或者我该如何反转它?
NASM 没有这样做。处理器做到了,因为 x86 是 Little Endian(请参阅endianness)。
如果你愿意,你可以写mov word[esi+edi],0xFF7F,但我怀疑代码一开始是正确的,只是你没有考虑字节序。
mov word[esi+edi],0xFF7F
英特尔机器的字节顺序是最低有效字节在前,这就是它是 FF 和 7F 的原因。
见http://en.wikipedia.org/wiki/Endianness
我不认为你想颠倒这个。