从键盘输入字符串按回车后换行输出
ASSUME CS:CODE, DS:DATA DATA SEGMENT
BUFFER DB 20DB ?DB 20 DUP(0)
CRLF DB 0AH, 0DH,'$' DATA ENDS CODE SEGMENT
START: MOV AX, DATA MOV DS, AX LEA DX,BUFFERMOV AH, 0AHINT 21HMOV AL, BUFFER+1ADD AL, 2MOV AH, 0MOV SI, AXMOV BUFFER[SI], '$'LEA DX, CRLF MOV AH, 09H INT 21HLEA DX, BUFFER+2MOV AH, 09H INT 21HMOV AH, 4CHINT 21H
CODE ENDS
END START
效果演示: