内存和寄存器之间的区别 [英] Difference between memory and register
问题描述
我看到了汇编代码,
MOV [EAX],EBX
以上一行,它们被提及为 [EAX]
是内存,而 EBX
是Register.因此,这是 [EAX]
和 EBX
之间的区别.以上说明会发生什么.
the above line, They are mentioned [EAX]
is memory and EBX
is Register. So, here what is the difference between [EAX]
and EBX
. What will happen in above instruction.
推荐答案
在这种语法中,寄存器周围的括号表示使用内存位置(根据指令,作为源或目的地),并在寄存器中指定了起始地址(您的情况下EAX).例如,如果EAX在指令之前包含1344,则将EBX中的值复制到逻辑存储器地址1344-1347(因为这是4字节复制).
In this syntax, brackets around a register means a memory location is used (as source or destination, according to the instruction) with starting address specified at the register (EAX in your case). For example, if EAX contained 1344 before the instruction, value from EBX is copied to logical memory addresses 1344-1347 (because this is 4 byte copying).
我希望这足以使它们在您的脑海中解开:),并请注意,可能存在更复杂的情况(例如, MOV [EAX + ECX],EBX
形成目标地址为两个寄存器值之和).
I hope this is enough to untangle them in your mind:) and please notice more complex cases are possible (e.g. MOV [EAX+ECX],EBX
forms destination address as sum of two register values).
这篇关于内存和寄存器之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!