Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-10 - 43,50517/getgen.mac
There are 7 other files named getgen.mac in the archive. Click here to see a list.
	TITLE	GETGEN FOR RPGII %1
	SUBTTL	READ IN A GENFIL WORD


;
;	GETGEN
;
;	READ IN ONE WORD OFF OF GENFIL. USED BY PHASE E.
;
;	BOB CURRIER		OCTOBER 12,1975 21:16:34
;
;	ALL RIGHTS RESERVED, BOB CURRIER
;


	TWOSEG
	RELOC	400000


	ENTRY	GETGEN			; READ A WORD
	ENTRY	SETGEN			; SET UP FILE FOR INPUT


GETGEN:	SOSG	GENBHI+2		; ANY ROOM LEFT?
	JRST	GETGNB			; NO - GET SOME MORE

GETGNA:	ILDB	CH,GENBHI##+1		; GET A CHARACTER
	POPJ	PP,			; EXIT


GETGNB:	AOS	GENBLK##		; BUMP BLOCK COUNT
	IN	GEN,			; GET SOME MORE
	JRST	GETGNA			; OK -

	MOVEI	CH,GENDEV##		; GET DEVICE
	JRST	DEVDED##		; AND GO BLOW UP


SETGEN:	MOVE	TA,GENBUF##		; SET .JBFF TO A BUFFER AREA
	MOVEM	TA,.JBFF##		; LIKE THIS
	INBUF	GEN,2			; GET 2 BUFFERS
	SETZM	GENBLK			; ZERO BLOCK COUNT

	MOVE	TE,GENHDR##		; GET "LOOKUP" PARAMETERS
	MOVE	TD,GENHDR+1		;
	SETZB	TC,TB			; ZAP MISC INFO
	LOOKUP	GEN,TE			; FIND THE FILE
	JRST	KNOGEN			; DISASTER - NO FILE

	POPJ	PP,			; FOUND, EXIT

KNOGEN:	OUTSTR	[ASCIZ "?GENFIL not found after written
"]
	JRST	KILL##			; GO DIE







	END