Input Two Number and Check Given Number are Equal or Not Equal in Assembly Language
Write Program in Assembly Language That Input Two Number and Check Given Number are Equal or Not Equal
Program Source Code:
org 100h
.model small
.data
msg1 db 10,13, "Enter First Number:$"
msg2 db 10,13, "Enter Second Number:$"
msg3 db 10,13, "Number are equal...$"
msg4 db 10,13, "Number are Not equal...$"
.code
main proc
mov ax,@data
mov ds,ax
mov dx,offset msg1
mov ah,9
int 21h
mov ah,1
int 21h
mov cl,al
mov dx,offset msg2
mov ah,9
int 21h
mov ah,1
int 21h
mov dl,al
cmp dl,cl
je equal
mov dx,offset msg4
mov ah,9
int 21h
mov ah,4ch
int 21h
equal:
mov dx,offset msg3
mov ah,9
int 21h
ret
Related Video
Post a Comment