什么是MOV和LEA的区别 [英] What is the difference between MOV and LEA
问题描述
我想知道这些指令的请告诉我的区别。
MOV AX,[TABLE-ADDR]
和
LEA AX,[TABLE-ADDR]
- LEA表示负载有效地址
- MOV意味着负载值
总之,LEA加载一个指向你解决,而MOV项目在该地址加载实际值。
LEA的目的是为了让一个执行一个不平凡的地址计算,并将结果[供以后使用]
LEA AX,[BP + SI + 5];值计算地址MOV AX,[BP + SI + 5];在该地址的负载值
如果有涉及的只是常量,MOV(通过汇编常数计算),有时可出现与执法机关的使用最简单的情况下重叠。其中,它的有用的是,如果你有多个基址多部分的计算等。
I would like to know Whats the difference between these instructions.
MOV AX, [TABLE-ADDR]
and
LEA AX, [TABLE-ADDR]
- LEA means Load Effective Address
- MOV means Load Value
In short, LEA loads a pointer to the item you're addressing whereas MOV loads the actual value at that address.
The purpose of LEA is to allow one to perform a non-trivial address calculation and store the result [for later usage]
LEA ax, [BP+SI+5] ; Compute address of value
MOV ax, [BP+SI+5] ; Load value at that address
Where there are just constants involved, MOV (through the assembler's constant calculations) can sometimes appear to overlap with the simplest cases of usage of LEA. Where its useful is if you have a multi-part calculation with multiple base addresses etc.
这篇关于什么是MOV和LEA的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!