Assembly instruction mov register,[register][register]

隐身守侯 提交于 2020-01-24 15:08:25

问题


I'm studying ASM 8086 theoretically on highschool (MASM, x86).

.data
var  dd   421,422, 443, 442, 444, 217, 432

.code
; some code
mov  esi, (OFFSET var)+4
mov  ebx, 4
mov  edx, [ebx][esi]   ; that's the line I don't uderstand

I ran that program and after that EDX == 000001BBh == 443 What's the meaning of last line in that code? What does it do?


回答1:


esi points 4 bytes after var, which is 422. ebx is 4.

[ebx][esi] is something which denotes [ebx+esi] and the [] is a pointer operator.

All this together will make [ebx][esi] point yet 4 bytes farther than 422 and obviously 443 can be found there.



来源:https://stackoverflow.com/questions/9855299/assembly-instruction-mov-register-registerregister

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