本想让它输入数字,然后出现逆序,不过不行,如何改才可以达到要求?请帮帮忙
DATAS SEGMENT
strs db 10,?,10 dup(?)
STRD DB 11 DUP(?)
CR EQU 13
LF EQU 10
CRLF DB CR,LF,'$'
PROMPT DB 'PLEASE INPUT A STRING:','$'
RES DB 'THE NEW RESLUT IS:','$'
DATAS ENDS
STACKS SEGMENT
DW 32 DUP(0)
;此处输入堆栈段代码
STACKS ENDS
CODES SEGMENT
MAIN PROC FAR
ASSUME CS:CODES,DS:DATAS,SS:STACKS
MOV AX,DATA
MOV DS,AX
LEA DX,PROMPT
MOV AH,9
INT 21H
LEA DX,STRS
MOV AH,10
INT 21H
LEA DX,CRLF
MOV AH,9
INT 21H
LEA DX ,CRLF
MOV AH,9
INT 21H
LEA DX,RES
MOV AH,9
INT 21H
XOR BH,BH
MOV BL,STR+1
MOV STRD[BX],'$'
MOV CX,BX
LEA DI,STRD
STD
LEA SI,STRS+2
ADD SI,BX
DEC SI
NEXT:
LODSB
MOV [DI],AL
INC DI
LOOP NEXT
LEA DX,STRD
MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
CODES ENDS
END START
[此贴子已经被作者于2006-11-20 22:23:42编辑过]