星帝 发表于 2018-12-23 15:02:16

求编写程序,判断寄存器AH和AL中D6位是否相同,如相同,AH置0,否则AL置0。

人造人 发表于 2018-12-23 15:44:17

assume cs:code, ds:data

data segment
stack        db 512 dup(?)
stack_top:
data ends

code segment
start:
        mov        ax, data
        mov        ds, ax
        mov        ss, ax
        mov        sp, stack_top
       
        mov        ax, 1240h
       
        mov        ch, ah
        mov        cl, al
        and        ch, 40h
        and        cl, 40h
        xor        ch, cl
        jnz        @F
        xor        ah, ah
        jmp        done
@@:
        xor        al, al
done:
        mov        ax, 4c00h
        int        21h
code ends
end start
页: [1]
查看完整版本: