解决排序问题
我的这个程序没有输出,编译运行都没有问题,这是怎么回事,求高手支招!;排序?
DATA SEGMENT
MEM DB 10,9,8,7,6,5,4,3,2,1
LEN DW $-MEM
DATA ENDS
CODE SEGMENT
MAIN PROC FAR
ASSUME CS:CODE,DS:DATA
START: PUSH DS
SUB AX,AX
PUSH AX
MOV AX,DATA
MOV DS,AX
MOV DL,1
REDO: MOV BX,OFFSET MEM
MOV CX,LEN
DEC CX
SUB DL,0
JZ DONE ;结果为0则跳转
MOV DL,0
REDO1: MOV AL,[BX]
INC BX
CMP AL,[BX]
JC NEXT ;低于则跳转
MOV AH,[BX]
MOV [BX],AL
DEC BX
MOV [BX],AH
INC BX
MOV DL,1
NEXT: DEC CX
JNZ REDO1 ;结果不为0则跳转
JMP REDO
DONE: RET 2
MAIN ENDP
CODE ENDS
END START