问题
I'm trying to accomplish the following with ASM:
mov [00A30020], [ebx+50]
So, I want to mov
the value of ebx+50
into 00A30020, but the compiler says it's an invalid statement.
回答1:
There is no such thing as a memory to memory move (with mov
, there is also move string). See this table.
You could load to a temporary register and then store it:
mov eax, [ebx+50]
mov [00A30020], eax
or to avoid using any extra registers at the cost of being inefficient:
push dword [ebx+50]
pop dword [00A30020]
来源:https://stackoverflow.com/questions/10249234/memory-to-memory-mov-correct-syntax