Program
assume cs:code,ds: data
data segment
m1 db 0ah,0dh,"Enter 1st no.:$"
m2 db 0ah,0dh,"Enter 2nd no.:$"
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
sub al,30h
mov bh,al
mov ah,01h
int 21h
sub al,30h
mov bl,al
lea dx,m2
mov ah,09h
int 21h
mov ah,01h
int 21h
sub al,30h
mov ch,al
mov ah,01h
int 21h
sub al,30h
mov ah,00h
add al,bl
aaa
add al,30h
add ah,ch
add ah,bh
add ah,30h
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 1st no.:$"
m2 db 0ah,0dh,"Enter 2nd no.:$"
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
sub al,30h
mov bh,al
mov ah,01h
int 21h
sub al,30h
mov bl,al
lea dx,m2
mov ah,09h
int 21h
mov ah,01h
int 21h
sub al,30h
mov ch,al
mov ah,01h
int 21h
sub al,30h
mov ah,00h
add al,bl
aaa
add al,30h
add ah,ch
add ah,bh
add ah,30h
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 ..........