	.TITLE	KERFP
	.VERSION 1
	.SBTTL	Header
/ ++
/
/	KERFP	X1B
/
/	(c) 1990, 1991 by Johnny Billquist
/
/	Kermit for pdp8.
/	The fileparser.
/
/	Id	Programmer
/	BQT	Johnny Billquist
/
/	Ver	Date		By	Comments
/	X1A	90/02/07 22:00	BQT	Copied from KERMIT.
/	X1B	91/03/14 02:30	BQT	Removed obsolete .RESET call.
/
/ --
	.SBTTL	Setup
	.INCLUDE	SYS:COMMON
	.EXTERNAL	DEV,MAIN
	.SBTTL	Zero page

	.XSECT	XREG
X0,	0
	.SBTTL	File parser.
/
/ FP must be after address 12000, since it calls USR.
/
	.ASECT	AFP
	FIELD	1
	*7400
/
	.ENTRY	FP
/
FP,	0			/Do fileparse...
	CLA
	TAD I	FP		/Get address to place devhandler.
	ISZ	FP
	DCA	DA$
	TAD I	FP		/Get ptr to filename.
	ISZ	FP
	.FPARSE	,DEV		/Parse it.
	CALUSR	13		/Reset deivce and file info.
	.FETCH	DEV,DA$,FERR	/Fetch device handler.
	DCA	X0		/Save pointer to results.
	TAD I	X0		/Get dev. #.
	JMP I	FP		/Return.

DA$:	0
/
FERR,	.PRINT	TF
	JMP	MAIN
/
TF,	TEXT	<10>"Error fetching device driver."<13>
/
	.END

