5

my masm source file is as follows:

qq.asm

assume cs:codesegment
codesegment segment
mov ax, 0ffffh
mov ds, ax
mov al, 00ffh
mov bx, 0006h
mov [bx], al
mov al, [0006]
mov ah, 0
mov dx, 0
mov cx, 3
s: add dx, ax
loop s
mov ax, 4c00h
int 21h
codesegment ends
end

I use masm program generates a .exe file which named qq.exe.When I use debug qq.exe -u, the instructors are as follows in the picture: picture

I confused that "mov al, [0006]" instructor in my qq.asm turned to "mov AL,06" in qq.exe. Any help would be appreciate.

4

1 回答 1

3

[0006]被解释为直接常数。您可以通过段覆盖来避免它:

mov al, ds:[0006]
于 2014-12-04T15:32:10.383 回答