Google
 

Trailing-Edge - PDP-10 Archives - bb-kl11c-bm_tops20_v6_1_atpch1_16 - autopatch/boot.c16
There are no other files named boot.c16 in the archive.
 INS 1/1	;16C1
	; *** Edit 7494 to BOOT.MAC by PRATT on 25-Jun-87
	; Bump edit number for the last edit. 
	; *** Edit 7483 to BOOT.MAC by PRATT on 28-May-87
	; Fix problems with holes in symbol table caused by incorectly handling zero
	; pages above page 777 in G.DIR4 routine. 
	;------------------------- Autopatch Tape # 13 -------------------------
	;------------------------- Autopatch Tape # 12 -------------------------
 DEL 12/2	;16C2
		bdebug==0		;BOOT'S INTERNAL DEBUG CONDITIONAL
 REP 17/2	;16C3
	V%EDIT==311
 WIT
	V%EDIT==312			;[7494] 
 INS 8/7	;16C4
	;**;[7483] Insert 1 line at PORG definition    JMP   May 27,1987

	IFNDEF BDEBUG,<BDEBUG==0>	;[7483] NO DEBUGGING CODE BY DEFAULT
 INS 25/13	;16C5
	;**;[7483] Insert 1 line after LOC 74 code   JMP  May 27,1987
		PRINTX  [DEBUGGING TURNED ON]
 REP 9/15	;16C6
	DDTPG1==300			;First page of DDT (if present)
 WIT
	;**;[7483] Replace 1 line with 1 line at DDTPG1 definition   JMP   May 27,1987
	DDTPG1==260			;[7483] First page of DDT (if present)
 INS 14/18	;16C7
	;**;[7483] Insert 1 line at FILPAG+1    JMP    May 27,1987
	ALLOC(SAVSLT)			;[7483] SAVES TSTSLT CONTENTS DURING PHYZRO
 REP 74/79	;16C8
	G.DIR4:	MOVEI T1,TSTADR		;ASSUME THIS IS OUR CHECK ROUTINE
		TXNE F,F.PHYS		;ARE WE WRITING TO A PHYSICAL PAGE?
		MOVEI T1,GETPHY		;YES, USE THIS ROUTINE
		CALL (T1)		;GO SEE IF MEMORY ADDRESS IS LEGAL
	 	  JRST G.DIR5		;BAD PAGE, DO NOT CLEAR IT
		SETZM (P4)		;CLEAR FIRST WORD OF PAGE
		MOVSI T1,(P4)		;GET START ADDRESS FOR BLT
		HRRI T1,1(P4)		;GET DESTINATION ADDRESS FOR BLT
		BLT T1,777(P4)		;CLEAR PAGE TO ZEROS
	G.DIR5:	SOJA Q1,G.DIR2		;GO SEE IF MORE PAGES TO CLEAR
 WIT
	;**;[7483] Replace G.DIR4 routine      JMP    May 27,1987

	;[7483] Here when .EXE directory entry wants a zero page 

	G.DIR4:	TXNE F,F.PHYS		;[7483] ARE WE WRITING TO A PHYSICAL PAGE?
		IFSKP.			;[7483] 
		  CALL TSTADR		;[7483] (P4/) NO - CHECK THE PAGE 
	 	    JRST G.DIR5		;[7483] BAD PAGE, DO NOT CLEAR IT
		  SETZM (P4)		;[7483] CLEAR FIRST WORD OF PAGE
		  MOVSI T1,(P4)		;[7483] GET START ADDRESS FOR BLT
		  HRRI T1,1(P4)		;[7483] GET DESTINATION ADDRESS FOR BLT
		  BLT T1,777(P4)	;[7483] CLEAR PAGE TO ZEROS
		ELSE.			;[7483] 
		  CALL GETPHY		;[7483] (P4/) YES - CHECK THE PHYSICAL ADDRESS
	 	    JRST G.DIR5		;[7483] BAD PAGE, DO NOT CLEAR IT
		  CALL PHYZRO		;[7483] (P4/) CLEAR OUT THE PHYSICAL PAGE
		ENDIF.
	G.DIR5:	SOJA Q1,G.DIR2		;GO SEE IF MORE PAGES TO CLEAR

	;[7483] PHYZRO - Clears out a page which is beyond what BOOT can normally 
	;       access (ie any page above 777). This code temporarily puts
	;	the physical address into the "test" page slot to reference
	;	it as virtual and then uses XBLT to clear the page.
	;
	;Call with P4/ address
	;
	;Returns + 1 always

	PHYZRO:	MOVE T1,TSTSLT		;GET EXISTING PAGE TABLE ENTRY
		MOVEM T1,SAVSLT		;SAVE IT AWAY
		MOVE T1,P4		;GET ADDRESS
		LSH T1,-^D9		;MAKE INTO A PAGE
		TXO T1,IMMPTR		;FORM IMMEDIATE POINTER (+WRITE+CACHE)
		MOVEM T1,TSTSLT		;MAP P4'S ADDRESS THRU TEST PAGE
		CLRPT TSTADD		;CLEAR PAGER ENTRY FOR TSTADD PAGE
		SETZM TSTADD		;CLEAR FIRST WORD OF PAGE
		MOVE T1,[TSTADD,,TSTADD+1] ;SET UP FOR BLT
		BLT T1,TSTADD+777	;CLEAR THE PAGE
		MOVE T1,SAVSLT		;GET ORIGINAL TSTSLT CONTENTS
		MOVEM T1,TSTSLT		;RESTORE ORIGINAL MAP ENTRY
		CLRPT TSTADD		;CLEAR PAGER ENTRY FOR TSTADD PAGE
		RET			;FINISHED
 SUM 259437