程序如下,很莫名其妙,cx是10,但减到0后自动变成ffff再重新减,有大佬知道是为什么吗
data segment
grade db 12,34,56,78,90,98,76,65,43,21
a db 0
c db 0
e db 0
data ends
code segment
assume cs:code,ds:data,ss:stack
start:mov ax,data
mov ds,ax
mov si,offset grade
mov al,60
mov ah,90
mov cx,10
l:cmp [si],al
** below
cmp [si],ah
** m
inc a
inc si
loop l
below:inc e
inc si
loop l
m:inc c
inc si
loop l
code ends
end start
data segment
grade db 12,34,56,78,90,98,76,65,43,21
a db 0
c db 0
e db 0
data ends
code segment
assume cs:code,ds:data,ss:stack
start:mov ax,data
mov ds,ax
mov si,offset grade
mov al,60
mov ah,90
mov cx,10
l:cmp [si],al
** below
cmp [si],ah
** m
inc a
inc si
loop l
below:inc e
inc si
loop l
m:inc c
inc si
loop l
code ends
end start