;FETCH - load program from disk if not in memory

	SEARCH	SYS
	SEARCH	SYSSYM

	.OFINI
	.OFDEF	MODULE,D.DDB
	.OFSIZ	MEMSIZ

START:	PHDR	-1,0,PH$REE!PH$REU
	GETIMP	MEMSIZ,A5
	BYP
	FSPEC	MODULE(A5),LIT
	INIT	MODULE(A5)
	FETCH	MODULE(A5),A0
	BNE	ERROR
	ORW	#FIL,-10(A0)
	EXIT

ERROR:	JOBIDX	A0
	CLRW	JOBCMS(A0)
	CLRW	JOBCMZ(A0)
	TYPESP	?
	PFILE	MODULE(A5)
	TYPECR	< not found>
	CRLF
	EXIT

	END