DATA SEGMENT
MES DB 10,13,'ENTER A STRING:$'
BUF DB 255,256 DUP(0)
MES1 DB 10,13,'THE MESSAGE IS $'
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV AH,09H
LEA DX,MES
INT 21H
MOV AH,0aH
LEA DX,BUF
INT 21H
MOV AH,09H
LEA DX,buf
INT 21H
LEA SI,BUF
MOV AX,0
MOV AL,BYTE PTR[SI]
ADD SI,AX
MOV BYTE PTR[SI+1],'$'
MOV AH,09H
LEA DX,BUF+2
INT 21H
MOV AX,4C00H
INT 21H
CODE ENDS
END START