最近在学习汇编语言,遇到了一个问题。怎么20+45打印出来的是乱码?
【代码附下】:
datas segment
x db 20
y db 45
n db ? ; 存放x+y的结果
datas ends
codes segment
assume cs:codes, ds:datas
start: mov ax, datas
mov ds, ax
mov dh, x
mov dl, y
add dl, dh
mov n, dl
mov ah, 02h
mov dl, n
add dl, 30h
int 21h
mov ah, 4ch
int 21h
codes ends
end start
以上代码是我在公司休息时凭感觉写出的,不知道是否正确。但是我肯定x+y输出来的是一个乱码,不是65,请各位高手、大侠帮帮忙?小弟才学汇编语言不就。 |