Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Assembly 我的.exe程序不是我所期望的_Assembly_Windows 7_64 Bit_Masm_Dosbox - Fatal编程技术网

Assembly 我的.exe程序不是我所期望的

Assembly 我的.exe程序不是我所期望的,assembly,windows-7,64-bit,masm,dosbox,Assembly,Windows 7,64 Bit,Masm,Dosbox,我的masm源文件如下: 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 我使用masm程序生成

我的masm源文件如下:

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
我使用masm程序生成一个名为qq.exe的.exe文件。当我使用debug qq.exe-u时,指导者如图所示:

我把我的qq.asm中的“mov al,[0006]”讲师变成了qq.exe中的“mov al,06”弄糊涂了。
任何帮助都将不胜感激。

[0006]
被解释为立即常数。您可以通过段替代来避免:

mov al, ds:[0006]

非常感谢@rkhb。再次感谢,我按照你的建议做了,一切都很好@rkhb。