x86:将操作注册为内存内容和内存地址? [英] x86: register operation as memory content and memory address?
问题描述
注册--->内存地址->内存内容
register ---> memory address --> memory content
内存地址->内存内容
以上模型正确吗?
,如果可以,您是否可以建议我是否认为正确?
and, if it is can you suggest if i am thinking it right or not??
movl%eax,%ebx->它将eax的内存地址移动到ebx,这也会导致内容也移动?
movl %eax, %ebx --> it moves memory address of eax to ebx which results in content moving as well??
movl( %eax),%ebx->它只是移动内容而不触摸地址??
movl (%eax),%ebx --> it just moves content and doesnot touch address??
移动值,%eax->将值的内存地址移动到%eax (以及内容,即eax具有新的内存内容)
movl value, %eax --> moves memory address of value to %eax (and content as well i.e. eax has new memory content)
移动%eax,val ---> val也具有新的内存地址和内容(均为%eax )
movl %eax, val ---> val has new memory address and content as well(both of %eax)
movl $ val,%eax ---> val是移动到%eax内容的内容(地址不变)
movl $val, %eax ---> val is a content which is moved to content of %eax(address doesnt change)
movl%eax,$ val ---> ?????
movl %eax, $val ---> ?????
movl(%eax),val ---> val刚有新的内存内容
movl (%eax), val ---> val has just the new memory content
mov(%eax),$ val --->错误?
mov (%eax), $val ---> error?
mov $ val,(%eax)--->错误?
mov $val, (%eax) ---> error?
推荐答案
movl%eax,%ebx
->移动%eax 的>内容到寄存器%ebx
中。 %eax
包含什么都无关紧要。
movl %eax, %ebx
--> moves the content of register %eax
into register %ebx
. It is irrelevant what %eax
contains.
movl(%eax),%ebx
->将%eax
中包含的内存地址的内容移至寄存器% ebx
movl (%eax),%ebx
--> moves the content of the memory address contained in %eax
into register %ebx
移动值,%eax
->移动的内容内存地址 value
进入寄存器%eax
。
移动%eax,val
->将寄存器%eax
的内容移动到内存地址 val
movl %eax, val
--> moves content of register %eax
to memory address val
moval $ val,%eax
->将常量 $ val
移至寄存器%eax
move%eax,$ val
-> 不可能。您不能将某物移动到恒定值。
movl %eax, $val
--> impossible. You cannot move something into a constant value.
movl(%eax),val
-> 不可能。您必须使用寄存器作为中间变量:
movl (%eax), val
--> impossible. You must use a register as intermediate:
movl (%eax),%eax
movl %eax,val ; or use another intermediate register than %eax
mov(%eax),$ val
-> i 不可能。您不能将某物移动到恒定值。
mov (%eax), $val
--> impossible. You cannot move something into a constant value.
mov $ val,(%eax)
-> move 将常量值 $ val
转换为%eax
中包含的内存地址
mov $val, (%eax)
--> move constant value $val
into memory address contained in %eax
.
这篇关于x86:将操作注册为内存内容和内存地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!