.model small .stack 100h .data msg db 'enter 1st number:','$' msg1 db 'enter 2nd number:','$' msg2 db 'sum is:','$' .code main proc mov ax,@data mov ds,ax mov ah,09h lea dx,msg int 21h mov ah,01h int 21h mov bl,al mov dx,0ah mov dx,0dh mov ah,09h lea dx,msg1 int 21h mov ah,01h int 21h mov cl,al add bl,cl sub bl,30h ; why subtraction gives the right answer? mov ah,09h lea dx,msg2 int 21h mov ah,02h mov dl,bl int 21h mov ah,4ch int 21h main endp end main
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)