.model small .stack 100h .data
e db "Even Number$" o db "Odd Number$"
.code
Start:
Mov ax,@data
Mov ds,ax
Mov ah,01
int 21h
Mov bl,2
div bl
cmp ah,0
je eve
Mov ah,02
Mov dl,0AH
int 21h
Mov dx,offset o
Mov ah,09
int 21h
Mov ah,4ch
int 21h
eve:
Mov ah,02
Mov dl,0AH
int 21h
Mov dx,offset e
Mov ah,09
int 21h
Mov ah,4ch
int 21h
end start
I am confused about this block of code
Mov bl,2
div bl
I use this div as a modulo
The confusion is how this is used as modulo
because in divide if we do 2/2 so answer will be 1
so how the output is appeared as even number