; Doug's Programming Language  -- DPL, Version 2.22
; Copyright (c) 1988 Douglas S. Cody, All rights reserved.
;--------------------------------
; F M O V E  -- MOVE AN ASCIIZ STRING INTO THE FILE NAME
;
; Entry conditions:
;	AX points to the source string
;	BX points to the target file
; Exit conditions:
;	Assume ALL registers modified
;
; Calling Example:
;
;	FILE	AFILE,'          ',A
;	STRING	STR,10
;	;
;	READ	CONSL,STR,10
;	CALL	FMOVE STR AFILE
;	OPEN	INPUT,AFILE
;
; Calling results:
;
;	The ASCIIZ string will be copied into the AFILE file name. There is
;	no protection for overruning the target file name length.
;	
;
SUBPGM	FMOVE
BEGIN	FMOVE
	EXTRN	_STRLEN:NEAR
	PUSH	ES
	PUSH	DS
	POP	ES
	MOV	SI,AX
	CALL	_STRLEN		; GET THE SOURCE LENGTH
	MOV	DI,BX
	ADD	DI,@FFNAM
	CLD
;
	REP	MOVSB
;
	SUB	AL,AL
	STOSB			; SET THE TERMINATOR
	POP	ES
	RET
;
ENDPGM	FMOVE
;
