求教一个汇编问题,求解释,谢谢
题目判断一个数大小,比0大,输出1,为0,输出0,小于0,输出-1不知为什么只能出3个结果
data segment
sum db 5,-1,0,3,100,-51
data ends
code segment
assume ds:data,cs:code
beg: mov ax,data
mov ds,ax
mov cx,5
lea di,sum
next: mov al,[di]
cmp al,0
jg qp
jl qw
je qr
inc di
dec cx
jne next
je ok
qp: mov dl,'+'
mov ah,02h
int 21h
mov dl,'1'
mov ah,02h
int 21h
qw: mov dl,'-'
mov ah,02h
int 21h
mov dl,'1'
mov ah,02h
int 21h
qr: mov dl,'0'
mov ah,02h
int 21h
ok: mov ah,4ch
int 21h
code ends
end beg