;两个整数是用非压缩型的BCD码存储的
;任意长度的两个数的加法
;任意长度的两个数的加法
;输入的非数字字符将被忽略
dseg segment
msg1 db "Please input the first number:",0dh,0ah,"$"
msg2 db "Please input the second number:",0dh,0ah,"$"
remsg db "The reslut is:$"
msg3 db "Any ket to quit$"
b1_len dw 0
buf_1 db 100 dup(0)
b2_len dw 0
buf_2 db 100 dup(0)
dseg ends
;########################################################
cseg segment
assume cs:cseg,ds:dseg
;******************************************
main proc far ;start of the program
mov dx,dseg
mov ds,dx
lea dx,msg1
mov ah,09
int 21h
lea bx,buf_1 ;input the first number
call input
call newline
lea dx,msg2
mov ah,09
int 21h
lea bx,buf_2 ;input the seco
dseg segment
msg1 db "Please input the first number:",0dh,0ah,"$"
msg2 db "Please input the second number:",0dh,0ah,"$"
remsg db "The reslut is:$"
msg3 db "Any ket to quit$"
b1_len dw 0
buf_1 db 100 dup(0)
b2_len dw 0
buf_2 db 100 dup(0)
dseg ends
;########################################################
cseg segment
assume cs:cseg,ds:dseg
;******************************************
main proc far ;start of the program
mov dx,dseg
mov ds,dx
lea dx,msg1
mov ah,09
int 21h
lea bx,buf_1 ;input the first number
call input
call newline
lea dx,msg2
mov ah,09
int 21h
lea bx,buf_2 ;input the seco