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.
section .data fun: add word[L+2],0x203 L: mov eax,0x1020304 ; this instruction including operand stored in 5 byte in memory ret
“有趣”的功能是做什么的?为什么eax会有一个新值0x1040604
好的,您有一个mov eax, 0x1020304, 具有 5 字节编码(也有 6 字节编码,但我们忽略它)。所以它看起来像这样(记住 - 小端):
mov eax, 0x1020304
B8 04 03 02 01
其中 L 指的是 B8,L+2 指的是 03。现在,如果您将 0x0203 添加到它(记住 - 小端序),03 将添加到 03 并且 02 将添加到 02,因此您会得到:
B8 04 06 04 01
这是:
mov eax, 0x01040604