Trailing-Edge
-
PDP-10 Archives
-
BB-J724A-SM_1980
-
sources/init2.p11
There are 8 other files named init2.p11 in the archive. Click here to see a list.
.SBTTL INITIALIZATION -- PHASE 2
;
; THIS SECTION CONTAINS THE SECOND PHASE OF INITIALIZATION.
; INITIALIZATION HAS BEEN SEPARATED INTO TWO PHASES
; SO THAT THE FIRST PHASE CAN BE OVERLAYED BY BUFFERS.
;
.REPT 0
COPYRIGHT (c) 1980, 1979
DIGITAL EQUIPMENT CORPORATION, maynard, mass.
THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
TRANSFERRED.
THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
CORPORATION.
DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
.ENDR
;
;
;
; REVISION HISTORY
;
;
; 4(001) BS ADDED EDIT NUMBERS
;
; 4(002) BS ADD CODE TO CREATE THE LINE ENABLE TASK FOR THE DL10 DRIVER
;
;
;
VINIT2=002
;
VEDIT=VEDIT+VINIT2
;
;
;
; HERE WHEN CHECK11 IS COMPLETE.
;
DN60: MOV #FIRZER,R1 ;START CHUNKS AT END OF PGM
MOV R1,CHFST ;MAKE THIS THE FIRST CHUNK
MOV R1,CHLST ; AND THE LAST
MOV #CHSIZE/2,R2 ;GET LENGTH OF A CHUNK
MOV R1,R0 ;COPY POINTER TO CHUNK
11$: CLR (R1)+ ;CLEAR A WORD IN THE CHUNK
SOB R2,11$ ;CLEAR THE REST OF THE WORDS
MOV #1,(R0) ;MARK FIRST CHUNK AS FREE
12$: ADD #<CHSIZE*2>,R0 ;POINT TO END OF CHUNK
CMP PHYLIM,R0 ;ARE WE OVER THE END OF STORAGE?
BLOS 13$ ;YES, ALL DONE.
SUB #CHSIZE,R0 ;NO, BACK UP TO START OF CHUNK
MOV R0,-(SP) ;SAVE CHUNK ADDRESS
MOV R0,CHHGH ;REMEMBER IN CASE LAST
JSR PC,FRECHK ;PUT THIS CHUNK ON FREE LIST
MOV (SP)+,R0 ;RESTORE CHUNK ADDRESS
BR 12$ ;TRY TO FREE ANOTHER CHUNK
;
; HERE WHEN THE LIST OF FREE CHUNKS IS ALL BUILT.
; BUILD THE IDLE TIME TASK, WHICH RUNS AT LOWEST PRIORITY
; AND DOES MOST OF THE FREEING OF CHUNKS AND MESSAGES.
;
13$: CLR R5 ;NOTE WE ARE INITIALIZING
JSR PC,GETTCB ;GET A TASK CONTROL BLOCK
BCS 15$ ;FAILED, THIS IS A FATAL ERROR.
MOV R0,TCBP3 ;THIS IS THE LOWEST-PRIORITY TASK
MOV #IDLE,TCPC(R0) ;STORE PROGRAM COUNTER FOR TASK
MOV R0,TCIDLE ;STORE IN GLOBAL FOR EASY ACCESS
;
;
.IF NE, FT.D87 ;CREATE THE LINE ENABLE TASK FOR DL10 4(002)
;CODE TO CREATE THE LINE ENABLE TASK FOR THE DL10 DRIVER 4(002)
JSR PC,GETTCB ;GET STORAGE FOR THE TCB
BCS 15$ ;FAILED, THIS IS A FATAL ERROR
MOV R0,TCNABL ;STORE POINTER IN GLOBAL CELL
MOV #DLNABL,TCPC(R0) ;STORE INITIAL PC
BIS #BR1, TCPS(R0) ;SET LOW PRIORITY
MOV TCBP3, R1 ;POINT TO EXISTING LOW PR TASK
MOV R0, TCBP3 ;PUT LINE ENABLE ON LIST
MOV R1, TCHAIN(R0) ;POINT TO OTHER TASKS
;
.ENDC ;.IF NE, FT.D87 4(002)
;
; NOW BUILD THE DL10 DRIVER TASK. THIS TASK INTERACTS WITH
; THE PDP-10 VIA THE DL10.
;
JSR PC,GETTCB ;GET A TASK CONTROL BLOCK
BCS 15$ ;FAILED, FATAL ERROR.
MOV R0,TCBP2 ;THIS IS THE ONLY MEDIUM-PRIORITY TASK
.IF DF,FT2020 ;IF ON A 2020
MOV #DMCTSK,TCPC(R0) ;STORE INITIAL PC FOR TASK
BIS #BR2,TCPS(R0) ;STORE PRIORITY LEVEL
MOV R0,TCDMDR ;STORE IN GLOBAL FOR EASY ACCESS
.IFF ;IF NOT ON A 2020
MOV #DLDRVR,TCPC(R0) ;STORE INITIAL PC FOR TASK
BIS #BR2,TCPS(R0) ;STORE PRIORITY LEVEL
MOV R0,TCDLDR ;STORE IN GLOBAL FOR EASY ACCESS
.ENDC ; END IF DF,FT2020
CLR TCBP1 ;NO HIGH-PRIORITY TASKS AS YET
;
; NOW WAIT FOR THE PDP-10 TO COME ON LINE
;
14$:
.IF DF,FT2020 ;IF ON A 2020
JSR PC,MC.INI ;INITIALIZE THE DMC11
.IFF ;IF NOT ON A 2020
JSR PC,INITDL ;INITIALIZE THE DL10
TST DLGONE ;IS THE DL10 ON LINE?
BNE 14$ ;NO, WAIT FOR IT.
.ENDC ;END IF DF,FT2020
CLR -(SP) ;FROM PRIORITY-ZERO DISPATCHER
MOV #DISPATCH,-(SP) ;SET UP PSEUDO-INTERRUPT
RTI ;DISMISS THE "INTERRUPT"
; AND THUS BRANCH TO DISPATCHER
;
; HERE IF THERE ISN'T ENOUGH FREE STORAGE TO GET THE
; INITIAL TCBS. THIS IS A FATAL ERROR.
;
15$: STOPCD NCI ;NOT ENOUGH CORE FOR INITIALIZATION
;