如何做LEA和几个指导工作? [英] how does LEA and several instruction work?
问题描述
我不完全了解的前两行的意义,和最后两行的差..
I dont fully understand the meaning of first two lines, and the difference of last two lines..
LDS SI,[BX]
LES DI,[BX]
LEA DI,5000h
MOV DI,5000h
我觉得LEA负荷在DI 5000H的DI和MOV加载内容5000H。我说得对不对?
I think LEA loads 5000h in DI and MOV loads content of 5000h in DI. Am I right??
推荐答案
前两个负荷的32比特的内容指向 BX
到 DS
和 SI
(或 ES
和迪
)。
The first two load the contents of 32 bits pointed to by bx
into ds
and si
(or es
and di
).
第二两个是相同的,因为该值是文字。但如果它们是:
The second two are the same because the values are literals. If, however they were:
lea di,[bx]
mov di,[bx]
那么你的预期是正确的:前者把地址 BX
到迪
,后者把16位指向 BX
到迪
。
then your expectation would be right: the former putting the address bx
into di
and the latter putting the 16 bits pointed to by bx
into di
.
有关双方的更多信息,请参见为这个问题
莱 / LDS
和这个问题 MOV
/ LEA
了。
For more information on both, see this question for les
/lds
and this question for mov
/lea
.
这篇关于如何做LEA和几个指导工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!