Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99e-bb - comcon.c11
There is 1 other file named comcon.c11 in the archive. Click here to see a list.
 REP 32/40	;11C1
		ADDM	P3,MAXMAX##	;INCREASE THE MAXIMUM VALUE FOR CORMAX
		DPB	P3,P1		;INDICATE THAT THIS PAGE EXISTS IN NXMTAB
 WIT
		DPB	P3,P1		;INDICATE THIS PAGE EXISTS IN NXMTAB
		PUSHJ	P,MEMOZR	;ZERO OUT THE PAGE AND CHECK FOR NXM
		  JRST	MEMON8		;GOT AN NXM
		ADDM	P3,MAXMAX##	;INCREASE THE MAXIMUM VALUE FOR CORMAX
 REP 1/41	;11C2
	;HERE WHEN MEMORY HAS BEEN MARKED ON LINE TO ADD ALL PAGES WHICH
	; WERE OFF LINE TO THE FREE CORE LIST
 WIT
	;HERE WHEN MEMORY HAS BEEN MARKED ON LINE AND CHECKED FOR NXM.
	;ADD ALL PAGES WHICH WERE OFF LINE TO THE FREE CORE LIST.

 REP 21/41	;11C3
	;HERE TO REFERENCE PAGES ADDED TO THE FREE CORE LIST SO IF THEY ARE
	; OFF LINE, IT WILL BE DETECTED BEFORE THEY ARE ATTEMPTED TO BE USED
	MEMON9:
		HRRZ	T1,P2		;FIRST PAGE SET ON LINE
		IDIVI	T1,^D36		;COMPUTE WORD AND BIT POSITION WITHIN NXMTAB
		MOVE	T2,BITTBL##(T2)	;MASK CORRESPONDING TO THAT BIT POSITION
		TDNE	T2,NXMTAB##(T1)	;IS THIS PAGE NOW ON LINE?
		JRST	MEMO11		;NO, FORGET IT
		HRRZ	T3,P2		;YES, GET PAGE NUMBER
		MOVE	T4,.CPMAP##
	IFE FTKLP,<
		TRO	T3,PM.ACC+PM.WRT;ACCESS ALLOWED AND WRITEABLE
		HRLM	T3,.MEUPM(T4)
	>
	IFN FTKLP,<
		HRLI	T3,(<PM.DCD>B2+PM.WRT)
		MOVEM	T3,.EUPMP/PAGSIZ##(T4)
	>
		CLRPGT	(0,.EUPMP)	;FLUSH PAGE TABLE SO NEW MAPPING IS IN EFFECT
	;WORRY ABOUT INTERLEAVED MEMORY
		MOVEI	T3,MEMITL##	;NUMBER OF WAYS MEMORY CAN BE INTERLEAVED
		MOVEM	J,MOFLPG##	;FLAG THAT MEMORY BEING SET ON LINE
					; NXM AT THIS POINT ISN'T A SERIOUS ERROR
	MEMO10:	MOVEI	T4,1000		;TIME TO WAIT FOR NXM FLAG TO CAUSE AN IRP.
		SETZM	.EUPMP-1(T3)	;REFRENCE THE PAGE TO MAKE SURE ITS REALLY THERE
		SOJG	T4,.		;WAIT LONG ENOUGH FOR NXM INTERRUPT TO HAPPEN
		TDNN	T2,NXMTAB##(T1)	;IS THE PAGE STILL ON LINE?
		SOJG	T3,MEMO10	;YES, CHECK NEXT WORD OF THE PAGE
					; TO INSURE THAT THERE ISN'T AN INTERLEAVING PROBLEM
		SETZM	MOFLPG##	;NO LONGER CHECKING FOR OFF LINE PAGES
	MEMO11:	CAIN	P2,(P1)		;REFERENCED ALL PAGES IN THE RANGE SET ON LINE?
		JRST	MEMO12		;FIX CORE ALLOCATION VARIABLES, TELL DAEMON, AND RETURN
		HRRZ	P2,@[IW MDSEC2,PAGTAB(P2)] ;NO, GET THE NEXT PAGE SET ON LINE
		JRST	MEMON9		;AND REFERENCE IT TO MAKE SURE ITS THERE
	MEMO12:	PUSHJ	P,CPINXF##	;FIX CORE ALLOCATION VARIABLES
 WIT

	;FINISH UP

		PUSHJ	P,CPINXF##	;FIX CORE ALLOCATION VARIABLES
 INS 1/43	;11C4
	;ROUTINE TO ZERO THE PAGE BEING SET ON-LINE AND CHECK FOR NXM.
	;CALL WITH T1=PAGE NUMBER, P1=BYTE POINTER TO NXMTAB
	;RETURNS CPOPJ IF NXM, CPOPJ1 IF PAGE OK.
	;MUST BE CALLED WITH MM, RETURNS WITH MM.
	;PRESERVES T1-T4.

	MEMOZR:	PUSHJ	P,SAVT##	;SAVE T1-T4
		HRRZ	T3,T1		;GET PAGE NUMBER
		MOVE	T4,.CPMAP##	;GET ADDRESS OF EXEC MAP
	IFE FTKLP,<
		TRO	T3,PM.ACC+PM.WRT ;ACCESSIBLE AND WRITABLE
		HRLM	T3,.MEUPM(T4)
	>; END IFE FTKLP
	IFN FTKLP,<
		HRLI	T3,(<PM.DCD>B2+PM.WRT) ;ACCESSIBLE AND WRITABLE
		MOVEM	T3,.EUPMP/PAGSIZ##(T4) ;SET NEW MAPPING FOR PAGE
	>; END IFN FTKLP
		CLRPGT	(0,.EUPMP)	;FLUSH PAGE TABLE SO NEW MAPPING IS IN EFFECT
	IFN FTMP,<
		PUSHJ	P,DWNMM##	;GIVE UP THE MM IN CASE NXM HAPPENS
	>; END IFN FTMP
		MOVEI	T4,1000		;TIME TO WAIT FOR NXM TO CAUSE AN INTERRUPT
		MOVEM	J,MOFLPG##	;FLAG WE ARE SETTING MEMORY OFF-LINE
		SETZM	.EUPMP		;ZERO FIRST WORD OF PAGE
		SOJG	T4,.		;WAIT LONG ENOUGH FOR NXM INTERRUPT TO HAPPEN
		LDB	T3,P1		;GET BIT FROM NXMTAB
		JUMPN	T3,MEMOZ1	;JUMP IF NXM HAPPENED
		MOVE	T3,[XWD .EUPMP,.EUPMP+1] ;SET TO CLEAR REMAINDER OF PAGE
		MOVEI	T4,1000		;TIME TO WAIT FOR NXM TO CAUSE AN INTERRUPT
		BLT	T3,.EUPMP+PAGSIZ##-1 ;ZERO THE REMAINDER OF THE PAGE
		SOJG	T4,.		;WAIT LONG ENOUGH FOR NXM INTERRUPT TO HAPPEN
		LDB	T3,P1		;GET BIT FROM NXMTAB
		SKIPN	T3		;DID NXM HAPPEN?
		AOS	(P)		;NO, SET UP SKIP RETURN
	MEMOZ1:	SETZM	MOFLPG##	;NO LONGER CHECKING FOR OFFLINE PAGE
	IFN FTMP,<
		PUSHJ	P,UPMM##	;GET BACK THE MM
	>; END IFN FTMP
		POPJ	P,		;RETURN
 REP 19/56	;11C5
	SETBR1:	CAIN	P1,-1		;DON'T ALLOW -1 FOR THE TIME BEING SINCE IT
					; CONFUSES THE HARDWARE
 WIT
	SETBR1:	CAIG	P1,17		;WEED OUT REFERENCES
		CAIGE	P1,1		; TO THE ACS
		CAIN	P1,-1		;-1 CONFUSES THE HARDWARE
 REP 10/178	;11C6
		PUSHJ	P,CLRTAB	;CLEAR BITS AND TABLES
 WIT
		PUSHJ	P,CLRBTS	;CLEAR BITS
 INS 21/180	;11C7
		PUSHJ	P,FNDPDS##	;FIND PDB
		MOVE	T1,.JDAT+SGANAM	;NAME WHICH WAS ENTERED
		MOVEM	T1,.PDNAM##(W)	;STORE
		SETZM	.PDSFD##(W)	;ZERO SFD INFO
		MOVSI	T1,.PDSFD##(W)	;SET UP A BLT TO CLEAR SFD STUFF
		HRRI	T1,.PDSFD##+1(W)
		BLT	T1,.PDSFD##+MAXLVL##-1(W)
		MOVEI	T1,JOBUAL##
		MOVEM	T1,.JDAT+SGAPPN
		PUSHJ	P,PTHFIL##	;GET PATH WHERE FILE WAS WRITTEN
		PUSHJ	P,NAMSTR##	;STR NAME
		  SKIPA	T1,DEVNAM(F)	;NOT A DSK, DEVICE NAME
		SKIPA	T2,DEVPPN(F)	;GET DIRECTORY
		MOVEI	T2,0		;NO DIRECTORY
		MOVEM	T1,.PDSTR##(W)	;STORE STR OR DEVICE NAME
		MOVEM	T2,.PDDIR##(W)	;DIRECTORY
		MOVSI	T1,.JDAT+JOBUAL##+3 ;WHRE THE SFD'S ARE STORED
		HRRI	T1,.PDSFD##(W)	;WHERE TO STORE PATH
		BLT	T1,.PDSFD##+MAXLVL##-1(W) ;STORE PATH
 REP 44/180	;11C8
	SAVERR::
	IFN FTEXE,<
		MOVE	J,.CPJOB##		;GET JOB NUMBER
 WIT
	SAVERR::MOVE	J,.CPJOB##	;GET JOB NUMBER
		PUSHJ	P,CLRTAB	;CLEAR BITS AND TABLES
	IFN FTEXE,<
 REP 5/223	;11C9
		MOVSI	T3,.JDAT+JOBUAL##+3 ;WHERE THE SFD'S ARE STORED
 WIT
		SETZM	.JDAT+JOBUAL##+3 ;ZERO FIRST SFD WORD (IN CASE OF JUNK FROM LOWFIN)
 REP 14/223	;11C10
		JRST	GJOB7		;NO, STORE A ZERO AS FIRST SFD
 WIT
		JRST	GJOB6A		;NO, STORE A ZERO AS FIRST SFD
 INS 20/223	;11C11
		MOVEI	T1,JOBUAL##
		MOVEM	T1,.JDAT+SGAPPN
		PUSHJ	P,PTHFIL##	;GET PATH BACK (CLOBBERED BUT BY VIRCHK)
 INS 24/223	;11C12
	GJOB6A:	MOVSI	T3,.JDAT+JOBUAL##+3 ;WHERE THE SFD'S ARE STORED
 REP 29/226	;11C13
	CLRTAB:	MOVE	T1,[JACCT,,JS.XO!JS.XOR] ;CLEAR EXECUTE ONLY SO
		ANDCAM	T1,JBTSTS##(J)	; USER WILL NOT BE RESTRICTED
		MOVSI	T1,(UP.CXO)
		ANDCAM	T1,.USBTS	;CLEAR XO CORE IMAGE
		MOVSI	T1,(JB.LSY)	;NO LONGER A PROGRAM
		ANDCAM	T1,JBTLIM##(J)	; FROM SYS
 WIT
	CLRTAB:	PUSHJ	P,CLRBTS	;CLEAR BITS IN JOB TABLES
 INS 40/226	;11C14

	CLRBTS:	MOVE	T1,[JACCT,,JS.XO!JS.XOR] ;CLEAR EXECUTE ONLY SO
		ANDCAM	T1,JBTSTS##(J)	; USER WILL NOT BE RESTRICTED
		MOVSI	T1,(UP.CXO)
		ANDCAM	T1,.USBTS	;CLEAR XO CORE IMAGE
		MOVSI	T1,(JB.LSY)	;NO LONGER A PROGRAM
		ANDCAM	T1,JBTLIM##(J)	; FROM SYS
		POPJ	P,		;RETURN
 SUM 124682