;INPUT_STRING--G5_13

;**********************************************************
datarea segment			;define data segment
  buffer	db	80 dup(?)
  flag		db	?
datarea ends
;**********************************************************
prognam segment			;defint code segment
;----------------------------------------------------------
main	proc	far		;main part of program

	assume cs:prognam,ds:datarea

start:				;starting execution address

;set up stack for return
	push	ds		;save old data segment
	sub	ax,ax		;put zero in AX	
	push	ax		;save it on stack

;set DS register to current data segment
	mov	ax,datarea	;datarea segment addr
	mov	ds,ax	 	;  into DS register
  
;MAIN PART OF PROGRAM GOES HERE
	lea	bx,buffer
	mov	flag,0
next:	mov	ah,01
	int	21h
	test	flag,01h
	jnz	follow
	cmp	al,20h
	jnz	exit
	mov	flag,1
	jmp	next
follow:	cmp	al,20h
	jz	exit
	mov	[bx],al
	inc	bx
	jmp	next
exit:	ret			;return to DOS

main	endp			;end of main part of program
;----------------------------------------------------------
prognam ends			;end of code segment
;**********************************************************

	end	start		;end assembly
