Program
assume cs:code,ds:data
data segment
m1 db 0ah,0dh,"enter no 1 $"
m2 db 0ah,0dh,"enter no 2 $"
m3 db 0ah,0dh,"result:$"
data ends
code segment
start:mov ax,data
mov ds,ax
lea dx,m1
mov ah,09h
int 21h
mov ah,01h
int 21h
mov bl,al
lea dx,m2
mov ah,09h
int 21h
mov ah,01h
int 21h
mov cl,al
sub bl,30h
sub cl,30h
add bl,cl
mov ax,bx
mov ah,00h
aaa
add ax,3030h
mov bx,ax
lea dx,m3
mov ah,09h
int 21h
mov dl,bh
mov ah,02h
int 21h
mov dl,bl
mov ah,02h
int 21h
mov ah,4ch
int 21h
code ends
end start
data segment
m1 db 0ah,0dh,"enter no 1 $"
m2 db 0ah,0dh,"enter no 2 $"
m3 db 0ah,0dh,"result:$"
data ends
code segment
start:mov ax,data
mov ds,ax
lea dx,m1
mov ah,09h
int 21h
mov ah,01h
int 21h
mov bl,al
lea dx,m2
mov ah,09h
int 21h
mov ah,01h
int 21h
mov cl,al
sub bl,30h
sub cl,30h
add bl,cl
mov ax,bx
mov ah,00h
aaa
add ax,3030h
mov bx,ax
lea dx,m3
mov ah,09h
int 21h
mov dl,bh
mov ah,02h
int 21h
mov dl,bl
mov ah,02h
int 21h
mov ah,4ch
int 21h
code ends
end start
No comments:
Post a Comment
Post Your valuable comments here ..........