.model small
.stack 100h
.data
n1 db "Enter first no:$"
n2 db 10d,"Enter second no:$"
n3 db 10d,"Addition is:$"
.code
mov ax,@data
mov ds,ax
mov ah,9
mov dx,offset n1
int 21h
CALL input1
mov ah,9
mov dx,offset n2
int 21h
CALL input2
mov ah,9
mov dx,offset n3
int 21h
add bl,al
sub bl,48d
mov dl,bl
mov ah,2
int 21h
mov ah,4ch
int 21h
input1 PROC
mov ah,1
int 21h
mov bl,al
RET
input1 ENDP
input2 PROC
mov ah,1
int 21h
RET
input2 ENDP
end
Output:
Comments
Post a Comment