【问题标题】:my .exe program is not what I expected我的 .exe 程序不是我所期望的
【发布时间】:2015-02-02 12:31:57
【问题描述】:

我的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程序生成了一个.exe文件,名字叫qq.exe。我用debug qq.exe -u时,图中教官如下:

我混淆了我的 qq.asm 中的“mov al, [0006]”教练在 qq.exe 中变成了“mov AL,06”。 任何帮助将不胜感激。

【问题讨论】:

    标签: assembly windows-7 64-bit masm dosbox


    【解决方案1】:

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

    mov al, ds:[0006]
    

    【讨论】:

    • 非常感谢@rkhb。
    • 再次感谢,我按照你的建议做了,一切都很好@rkhb。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多