jmp start
mess db 0ah,0dh,'1st character:$'
mess2 db 0ah,0dh,'2nd character:$'
mess3 db 0ah,0dh,'the character are the same!$'
mess4 db 0ah,0dh,'the character are not the same!$'
PG db ?
start:
mov ah,09h
lea dx,mess
int 21h
mov ah,07h
int 21h
mov ah,02h
mov PG,al
mov dl,PG
int 21h
mov ah,09h
lea dx,mess2
int 21h
mov ah,07h
int 21h
mov ah,02h
mov bl,al
mov dl,al
int 21h
cmp PG,bl
je equal
jne nequal
equal:
mov ah,09h
lea dx,mess3
int 21h
int 20h
cmp PG,bl
jne nequal
nequal:
mov ah,09h
lea dx,mess4
int 21h
int 20h
cmp PG,bl
No comments:
Post a Comment