能不能帮我看看此程序哪错了《谢谢》《求出每名学生的名次,并保存在rank数组。rank+i存放第i名学生的名次》
;program title goes here---rank;***********************************
data segment ;define data segment
grate dw 88,75,95,63,98,78,87,73,90,60
rank dw 10 dup(?)
data ends
;************************************
program segment ;define code segment
start:
main proc far
assume cs:program,ds:data
push ds
sub ax,ax
push ax
mov ax,data
mov ds,ax
mov di,10
mov bx,0
loop1:
mov ax,grate[bx]
mov dx,0
mov cx,10
lea si,grate
next:
cmp ax, grate[bx+2]
jg no_count
inc dx
no_count:
add si,2
loop next
mov rank[bx],dx
add bx, 2
dec cx
jne loop1
ret
main endp
program ends
end start