8086汇编字符串输入与输出
DATAS SEGMENT ;字符串输入并打印输出
BUF DB 20 DUP('$')
CRLF DB 0AH,0DH,'$'
DATAS ENDS
STACKS SEGMENT
DB 200 DUP(0)
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
LEA DX,BUF
MOV AH,0AH
INT 21H
LEA dx,CRLF
MOV AH,9
INT 21H
MOV AH,9
LEA DX,BUF+2
INT 21H
MOV AH,4CH
INT 21H
CODES ENDS
END START