	.TITLE	FIXFIL
	.VERSION	1
/ +++
/
/ FIXFIL X1A
/
/ BY JOHNNY BILLQUIST
/
/ ---
	.FSECT	.FIXFIL
	.ENTRY	$FIXFIL
/
$FIXFIL,0		/Return address.
	CLA
	TAD	(-4)	/Setup count for 4 words.
	DCA	LC$
	TAD	(-3)	/Setup count for 3 words.
	DCA	LC2$
	DCA	FLG$	/Clear wildcard flag.
	TAD I	$FIXFIL	/Get pointer.
	ISZ	$FIXFIL
	DCA	PTR$	/Save pointer.

LOOP$:	TAD	FLG$	/Check flag.
	SZA CLA		/Set?
	JMP	SET$	/Yup. Do the SET action.
	TAD I	PTR$	/Nope. Check if 1:st char is a *.
	AND	(7700)
	TAD	(-5200)
	SNA CLA
	JMP	HISET$	/It was. Start action.
	TAD I	PTR$	/Was not. Check if low char is a *.
	AND	(77)
	TAD	(-52)
	SZA CLA
	JMP	NXT$	/Was not. Next!
	TAD I	PTR$	/Was too. Get word.
	AND	(7700)	/Mask high.
	TAD	(77)	/Set low.
	DCA I	PTR$	/Save word.
	CMA		/Set flag.
	DCA	FLG$
	JMP	NXT$	/Next!

HISET$:	CMA		/Ok. All should be GO after this... Set flag.
	DCA	FLG$
SET$:	CMA		/Set ?? in word.
	DCA I	PTR$	/Save word.
NXT$:	ISZ	PTR$	/Bump pointer.
	ISZ	LC2$	/Bump count for 3.
	SKP		/Skip if not fulfilled.
	DCA	FLG$	/Counted 3. Clear wildcard flag again.
	ISZ	LC$	/Bump count.
	JMP	LOOP$	/Repeat.
	RDF		/Get return field.
	TAD	(CIF)
	DCA	.+1
	HLT
	JMP I	$FIXFIL	/Return.
/
LC$:	0
LC2$:	0
PTR$:	0
FLG$:	0
/
$
