.MODEL SMALL
.DATA
STR1 DB 5 DUP(' '),'$'
STR2 DB 5 DUP(' '),'$'
NL DB 0DH,0AH,'$'
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX
LEA SI,STR1
LEA DI,STR2
MOV AH,01H
AGAIN:
INT 21H
CMP AL,0DH
JE BAK
MOV [SI],AL
INC SI
JMP AGAIN
BAK:
MOV AL,'$'
MOV [SI],AL
MOV AH,09H
LEA DX,NL
INT 21H
LEA SI,STR1
MOV CX,LENGTH STR1
ADD CX,1
DOTHIS:
MOV AL,[SI]
MOV [DI],AL
INC DI
INC SI
LOOP DOTHIS
MOV AL,'$'
MOV [DI],AL
MOV AH,09H
LEA DX,NL
INT 21H
LEA DX,STR2
INT 21H
MOV AH,4CH
INT 21H
MAIN ENDP
END MAIN
OUTPUT
***********
Z:\SYSTEM~1\AS1>ex8
hello
hello