;输入10个字符,并反序输出
DATA SEGMENT
DD1
DB 10 DUP(?)
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:MOV AX,DATA
MOV DS,AX
LEA BX,DD1
; DD1的有效地址放入BX中
MOV CX,0AH
AAA1: MOV AH,1
INT 21H
MOV [BX],AL
INC BX
LOOP AAA1
MOV CX,0AH
;Output '--'
MOV DL,'--'
MOV AH,2
INT 21H
AAA2: MOV DL,[BX]
MOV AH,2
INT 21H
DEC BX
LOOP AAA2
AAA3: MOV AH,4CH
INT 21H
CODE ENDS
END START
DATA SEGMENT
DD1
DATA ENDS
CODE SEGMENT
START:MOV AX,DATA
AAA1: MOV AH,1
;Output '--'
AAA2: MOV DL,[BX]
AAA3: MOV AH,4CH
CODE