上传一个排序程序,供大家参考,欢迎指导一下
DSEG SEGMENTMEM DW 100 DUP(?)
DSEG ENDS
;
CSEG SEGMENT
ASSUME CS:CSEG,DS:DSEG
START: MOV AX,DSEG
MOV DS,AX
LEA DI,MEM
NEXT1: MOV SI,DI
MOV CL,BL
NEXT2: MOV AX,[SI]
ADD SI,2
CMP AX,[SI]
JNC NEXT3
MOV DX,[SI]
MOV [SI-2],DX
MOV [SI],AX
NEXT3: DEC CL
JNZ NEXT2
DEC BL
JNZ NEXT1
MOV AH,4CH
INT 21H
CSEG ENDS
END START