	Title GetCmd
	page ,132

;-------------------------------------------------------------------------
	CMDLNTH	EQU 80H
	CMDLINE	EQU 81H

	EXTRN	__PSP:WORD

;-------------------CODE SEGMENT DEFINITION ------------------------------

GetCmd_Text	SEGMENT	byte	PUBLIC	'CODE'
	ASSUME	CS:GetCmd_Text
;-------------------------------------------------------------------------

PUBLIC	GetCmd
GetCmd	PROC	FAR

	push	bp
	mov	bp,sp
	sub	sp, 4
	push	si
	push	di
	push	ds

	LES	DI,[bp+6]		;ES:DI POINTS TO destination string

	MOV	DS, [__PSP]		;get program segment prefix segment #

	MOV	SI, CMDLNTH
	MOV	CX, 0
	MOV	CL, [SI]		;CX=LENGTH OF CMD LINE

	MOV	SI, CMDLINE
	CLD
	REP	MOVSB			;copy to fortran string at ES:DI

	pop	ds
	pop	di
	pop	si
	mov	sp,bp
	pop	bp
	ret	4

GetCmd	ENDP
;-------------------------------------------------------------------------

GetCmd_Text	ENDS
	END
