IDEAL
MODEL small
STACK 100h

DATASEG
	msg1 db 'Please enter your name, press enter to finish',13,10,'$'
	msg2 db 13,10,'Program finished$'
	msg3 db 13,10,'Here be dragons$'

CODESEG
proc GetName
	push bp
	mov bp, sp
	sub sp, 10
	mov di, sp
	mov	ah, 1
	xor bx, bx
get_char:
	int 21h
	cmp al, 13
	je quit_proc
	mov	[ss:di+bx], al
	inc bx
	jmp get_char
quit_proc:
	add sp, 10
	pop bp
	ret
endp GetName
	
start:
	mov ax, @data
	mov ds, ax  
	mov ah, 9
	mov dx, offset msg1
	int 21h
	call GetName
	mov ah, 9
	mov dx, offset msg2
	int 21h
exit:
	mov ax, 4c00h
	int 21h
	
	nops db 20E8h dup (90h)
	mov ah, 9
	mov dx, offset msg3
	int 21h
	jmp exit
END start





