.model small .data msg1 db 'please input 5 characters',13,10,'$' msg2 db 10,?,10 dup(?) msg3 db 'please input 1 digit ',13,10,'$' msg4 db 'please input 2 digit ',13,10,'$' msg5 db 'the result is: ',13,10,'$' .code start: mov ax,@data mov ds,ax mov dx, offset msg3 mov ah,9 int 21h mov ah,1 int 21h sub al,30h mov bl,al mov dx, offset msg4 mov ah,9 int 21h mov ah,1 int 21h mov bh,al mov dx,offset msg5 mov ah,9 int 21h mov al,bh sub al,30h add al,bl add al,30h mov dl,al mov ah,02 int 21h mov ah,4ch int 21h end start end