Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99e-bb - autcon.c11
There is 1 other file named autcon.c11 in the archive. Click here to see a list.
 INS 18/9	;11C1
		JUMPE	T2,CPOPJ##	;GIVE UP NOW IF NO PROTOTYPE KDB
		PUSHJ	P,KDBCTG	;ENSURE NECESSARY PARTS OF KDB ARE CONTIGUOUS
 INS 10/14	;11C2
		PUSHJ	P,UDBCTG	;ENSURE NECESSARY PARTS OF UDB ARE CONTIGUOUS
 INS 22/16	;11C3
		PUSHJ	P,UDBCTG	;ENSURE NECESSARY PARTS OF UDB ARE CONTIGUOUS
 REP 34/17	;11C4
		MOVE	T1,NUMTAP##	;YES, POINT GENTAB AT THIS DDB
		CAIG	T1,TAPN##
		HRRM	F,GENTAB##-1(T1)
 WIT
		HLLZ	T1,DEVNAM(F)	;GET THIS DDB NAME
		MOVSI	T2,-GTLEN##	;AOBJN POINTER
		CAME	T1,GENTAB##(T2)	;MATCH?
		AOBJN	T2,.-1		;NO
		SKIPGE	T2		;POINTER RUN OUT?
		HRRM	F,GENTAB##(T2)	;SAVE ADDR FOR GENERIC DEVICE SEARCH
 INS 1/20	;11C5
	;ROUTINE TO ENSURE NECESSARY PARTS OF KDB WILL BE PHYSICALLY CONTIGUOUS.
	;CALL:
	;	P4/ TYPTAB INDEX
	;	PUSHJ	P,KDBCTG
	;RETURN:
	;	CPOPJ ALWAYS
	;PRESERVES T2 AND T3 FOR SUBSEQUENT CALL TO GETCOR/CORGRB

	KDBCTG:	CAIGE	P4,TAPIDX	;MAGTAPE KDB?
		POPJ	P,		;NO, DISKS NEED NOTHING CONTIGUOUS
		MOVE	T1,[TKWCCL##,,TKBCCL##+4] ;# WORDS,,OFFSET TO CONTIGOUS AREA
		PJRST	CHKCTG		;MAKE SURE ALLOCATION WILL BE CONTIGUOUS


	;ROUTINE TO ENSURE NECESSARY PARTS OF UDB WILL BE PHYSICALLY CONTIGUOUS.
	;CALL:
	;	P4/ TYPTAB INDEX
	;	PUSHJ	P,UDBCTG
	;RETURN:
	;	CPOPJ ALWAYS
	;PRESERVES T2 AND T3 FOR SUBSEQUENT CALL TO GETCOR/CORGRB

	UDBCTG:	CAIGE	P4,TAPIDX	;MAGTAPE UDB?
		POPJ	P,		;NO, DISKS NEED NOTHING CONTIGUOUS
		MOVE	T1,TAPCTG-TAPIDX(P4) ;# WORDS,,OFFSET TO CONTIGUOUS AREA
	;	PJRST	CHKCTG		;MAKE SURE ALLOCATION WILL BE CONTIGUOUS


	;ROUTINE TO ENSURE CORE ALLOCATION WILL BE PHYSICALLY CONTIGUOUS.
	;CALL:
	;	T1/ # WORDS,,OFFSET TO CONTIGUOUS AREA
	;	PUSHJ	P,CHKCTG
	;RETURN:
	;	CPOPJ ALWAYS
	;PRESERVES T1-T4

	CHKCTG:	TLNE	T1,-1		;ZERO WORDS IS ALWAYS CONTIGUOUS
		SKIPN	CORLOC		;ALLOCATING FROM ONCE ONLY CORE?
		POPJ	P,		;NO, MONITOR FREE CORE IS CONTIGUOUS
		PUSHJ	P,SAVT##	;MESSY BUT NECESSARY
		HLRZ	T2,T1		;LENGTH OF CONTIGUOUS AREA
		HRRZS	T3,T1		;START OF CONTIGUOUS AREA
		ADDI	T2,-1(T1)	;LAST WORD IN CONTIGUOUS AREA
		ADD	T1,CORLOC	;COMPUTE WHERE CONTIGUOUS AREA WILL RESIDE
		ADD	T2,CORLOC	;...
		LSHC	T1,W2PLSH##	;CONVERT TO PAGE NUMBERS
		CAIN	T1,(T2)		;CONTIGUOUS AREA RESIDE IN SAME PAGE?
		POPJ	P,		;YES, RETURN
		MOVE	T1,CORLOC	;ADJUST CORLOC SO ALLOCATE WILL BE CONTIGUOUS
		ADDI	T1,PG.BDY##	; BY ROUNDING UP TO NEXT PAGE
		TRZ	T1,PG.BDY##	; AND BACKING OFF BY THE OFFSET
		SUB	T1,T3		;SUBTRACT OFFSET FROM START OF NEXT PAGE
		MOVEM	T1,CORLOC	;GIVES US A NEW CORLOC
		POPJ	P,		;RETURN
 INS 34/23	;11C6
	TAPCTG:	EXP TX2CTG##
		EXP DX1CTG##
		EXP T78CTG##
		EXP TM2CTG##

 SUM 70739