Google
 

Trailing-Edge - PDP-10 Archives - bb-kl11f-bm_tops20_v7_0_atpch1_19 - autopatch/cobcom.c12
There are 2 other files named cobcom.c12 in the archive. Click here to see a list.
 REP 34/1	;12C1

 WIT
	;MJC	 4-NOV-85	[1613] Check for table overflow
 REP 5/10	;12C2

 WIT

 REP 7/11	;12C3

 WIT

 REP 32/13	;12C4
		JRST	1(TE)		;SUCCESS EXIT
 WIT
		JRST	1(TE)		;SUCCESS EXIT
 REP 33/29	;12C5
	XPAND1:	MOVE	TE,SAVEAC	;ANY TABLES ABOVE THIS ONE?
 WIT
	;[1613]CHECK FOR TABLE OVERFLOW

	XPAND1:	HRRZ	TA,SAVEAC	;[1613]GET TABLE POINTER
		HLRZ	TE,SAVEAC	;[1613]AMOUNT OF GROTH
		ADD	TE,1(TA)	;[1613]TABLE WILL GROW TO THIS SIZE
		HRRZ	TD,(TA)		;[1613]THE START OF THE TABLE
		HRRZ	TE,TE		;[1613]RIGHT HALF ONLY
		SUB	TE,TD		;[1613]LESS THE START ADDRESS
		MOVE	TD,TE		;[1613]SAVE THE DIFFERENCE
		ANDI	TE,700000	;[1613]MORE THAN 15 BITS?
		CAIN	TE,0		;[1613]OVERFLOW IF SO
		JRST	XPAND6		;[1613]OK - NO TABLE OVERFLOW

	;[1613]SEE IF WE CAN EXPAND ONE LAST TIME BY SOME SMALLER AMOUNT

		ANDI	TD,77777	;[1613]THE AMOUNT OF OVERLAP
		HLRZ	TE,SAVEAC	;[1613]EXPANSION WANTED
		SUB	TE,TD		;[1613]WHAT WILL FIT
		HLRE	TD,1(TA)	;[1613]LEFT UNUSED FROM LAST EXPANSION
		ADD	TE,TD		;[1613]INCLUDE IT TOO
		SOS	TE		;[1613]OFF BY ONE
		CAIG	TE,20		;[1613]ENOUGH TO SALVAGE?
		JRST	TBLOVF		;[1613]NO - GIVE UP
		HRLM	TE,SAVEAC	;[1613]YES - EXPAND BY THAT MUCH
		JRST	XPAND6		;[1613]CONTINUE WITH A SMALLER EXPANSION

	TBLOVF:	OUTSTR	[ASCIZ /?Compiler table overflow. Compilation aborted. 
	/]	;[1613]
		JRST	RESTRT		;[1613]ABORT AND RESTART

	XPAND6:	MOVE	TE,SAVEAC	;[1613]ANY TABLES ABOVE THIS ONE?
 SUM 75573