.MODEL SMALL
.DATA
NW_LINE DB 0AH,0DH,'THE OUTPUT IS: ','$'
STR1 DB ?
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX
LEA SI,STR1
GOBAK:
MOV AH,01H
INT 21H
CMP AL,0DH
JE BAK
MOV [SI],AL
INC SI
JMP GOBAK
BAK:
MOV AL,'$'
MOV [SI],AL
MOV AH,09H
LEA DX,NW_LINE
INT 21H
MOV AH,09H
LEA DX,STR1
INT 21H
MOV AH,4CH
INT 21H
MAIN ENDP
END MAIN
OUTPUT
***********
Z:\SYSTEM~1\AS1>ex2
hello
THE OUTPUT IS: hello