帮忙看看问题出在哪儿?不能输出排序的结果
STACK SEGMENT STACKDB 200 DUP(0)
STACK ENDS
DATA SEGMENT
BUF1 DB 30H,10H,40H,20H,50H,70H,60H,90H,80H,0,0FFH
TAB1 DB 'pai xu qian de shun xu shi: ',0DH,0AH,'$'
N1=$-BUF1
BUF2 DB 22H,11H,33H,55H,44H,77H,66H,99H,88H,0AAH,0EEH,0
TAB2 DB 0DH,0AH,'pai xu qian de shun xu shi: ',0DH,0AH,'$'
N2=$-BUF2
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA,SS:STACK
BEGIN:
MOV AX,DATA
MOV DS,AX
MOV BX,AX
LEA DX,TAB1
MOV AH,9
INT 21H
MOV AX,BX
LEA BX,BUF1
MOV CX,N1
CALL SORT
MOV BX,AX
LEA DX,TAB2
MOV AH,9
INT 21H
MOV AX,BX
LEA BX,BUF2
MOV CX,N2
CALL SORT
MOV AH,4CH
INT 21H
SORT PROC
PUSH AX
PUSH DX
PUSH SI
PUSH DI
MOV DX,CX
DEC DX
MOV SI,1
LOPI:
MOV DI,SI
INC DI
MOV AL,[BX+SI-1]
LOPJ:
CMP AL,[BX+DI-1]
JBE NEXT
XCHG [BX+DI-1],AL
MOV [BX+SI-1],AL
NEXT:
INC DI
CMP DI,CX
JBE LOPJ
CALL PRINTIT
INC SI
CMP SI,DX
JBE LOPI
POP DI
POP SI
POP DX
POP AX
RET
SORT ENDP
PRINTIT PROC
MOV DL,AL
MOV AH,2
INT 21H
RET
PRINTIT ENDP
CODE ENDS
END BEGIN