怎么输出一个数组?
冒泡法排好序了,怎么把数组输出出来啊???;****************
datarea SEGMENT
;a DW 5 DUP(?)
a DW 1,2,3,4,5
datarea ENDS
;*****************
prognam SEGMENT
;-----------------
main PROC FAR
ASSUME CS:prognam,DS:datarea
start:
;set up stack for return
PUSH DS
SUB AX,AX
PUSH AX
;set ds register to current data segment
MOV AX,datarea
MOV DS,AX
;main part of program goes here
MOV CX,5
DEC CX
LOOP1: MOV DI,CX ;save count1 to di
MOV BX,0 ;clear bx
LOOP2: MOV AX,a[BX]
CMP AX,a[BX+2]
JGE cotinue ;greater or equal
XCHG AX,a[BX+2]
MOV a[BX],AX;stroe greater num
;MOV DL,a[BX]
;MOV AH,2
;INT 21h
cotinue: ADD BX,2
LOOP LOOP2
MOV CX,DI;restore countl
LOOP LOOP1;if not the final pass
;repeat
dIsplay: LEA DL,a;不会做了!!!晕
;MOV DL,[DX]
MOV AH,2 ;暂停,任意键关闭
INT 21h
RET
main ENDP
;-----------------
prognam ENDS
;*****************
END start