我写的输入两个数相加,然后输出结果!不知道哪里出问题了
data segmentinfor1 db "Please inout the firstdata(<10):$"
infor2 db 0ah,0dh,"Please inout the second data(<10):$"
infor3 db 0ah,0dh,"The result is(<10):$"
data ends
code segment
assume ds:data,cs:code
start: mov ax,data
mov ds,ax
lea dx,infor1
mov ah,09h
int 21h
mov ah,01h
int 21h
sub al,30h
mov bl,al
lea dx,infor2
mov ah,09h
int 21h
mov ah,01h
int 21h
sub al,30h
xor ah,ah
add al,bl
aaa
lea dx,infor3
mov ah,09h
int 21h
push ax
mov dl,ah
add dl,30h
mov ah,02h
int 21h
pop ax
push ax
mov dl,al
add dl,30h
mov ah,02h
int 21h
mov ah,4ch
int 21h
code ends
end start