data segment
num1 db 100 dup(0)
num2 db 100 dup(0)
num3 db 100 dup(0),'$'
data ends
code segment
assume cs:code,ds:data
start: mov ax,data
mov ds,ax
mov cx,20
mov si,10
x0: mov al,1h
int 21h
mov dl,al
cmp dl,'+'
jz x1
mov num1[si],dl
inc si
loop x0
x1: mov cx,20
mov di,10
x2:mov al,1h
int 21h
mov dl,al
cmp dl,'='
jz a0
mov num2[di],dl
inc di
loop x2
clc
pushf
a0:mov cx,10
mov bx,90
a1: mov dl,num1[si-1]
mov al,num2[di-1]
popf
adc al,dl
aaa
pushf
add al,30h
mov num3[bx],al
dec si
dec di
dec bx
loop a1
inc bx
a2: cmp num3[bx],30h
jnz a3
inc bx
loop a2
a3: lea dx,num3[bx]
mov ah,9h
int 21h
mov ah,4ch
int 21h
code ends
end start
------解决方案--------------------
代码里的有几处 mov al, 1h 应该是 mov ah, 1 吧