Memory to memory MOV - Correct Syntax

那年仲夏 提交于 2019-12-24 09:16:41

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!