【接收一个数】
I
【判断奇偶数】-------奇数
I I
I偶数 I
【 显示0 】 I
I
【 显示1 】<----------
code segment
assume cs:code
start:
mov ah,00h
int 16h
sub al,30h
mov ah,0
mov bl,2
div bl
cmp ah,0
jz out0
jmp out1
out0:
mov dl,30h
mov ah,2h
int 21h
jmp exit
out1:
mov dl,31h
mov ah,2h
int 21h
exit:
mov ax,4c00h
int 21h
code ends
end start