功能:用户输入信息并回车后,将用户输入的信息显示出来!
程序如下:(望各位兄台不惜赐教,感谢不在话下)
DATA SEGMENT
Z DB 100 DUP(?)
DATA ENDS
STACK SEGMENT STACK
DB 100 DUP(?)
STACK ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA,SS:STACK
Start:
MOV AX,DATA
MOV DS,AX
LEA DX,Z
MOV AH,10
INT 21H
MOV DL,0DH
MOV AH,2
INT 21H
MOV BX,OFFSET Z
MOV SI,0
REPA:
INC SI
MOV DL,[BX][SI]
CMP DL,0DH
JNZ DISP
MOV AH,4CH
INT 21H
DISP:
MOV AH,2
INT 21H
JMP REPA
CODE ENDS
END Start