将10个无符号数从大到小重新排序,无结果输出怎么回事?
DATAS SEGMENTBUF DB 90,80,97,86,75,78,67,56,73,85
N=$-BUF
DATAS ENDS
STACKS SEGMENT
DB 200 DUP(0)
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES, DS:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
LEA BX,BUF
MOV SI,BX
MOV CX,N-1
LOPA:MOV DI,SI
INC DI
LOPB:MOV AH,[BX+SI]
CMP AH,[BX+DI]
JL NEXT
XCHG AH,[BX+DI]
MOV [BX+SI],AH
NEXT:INC DI
CMP DI,N
JNE LOPB
INC SI
DEC CX
JNE LOPA
MOV AH,4CH
INT 21H
CODES ENDS
END START