问题
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