Trailing-Edge
-
PDP-10 Archives
-
BB-J992D-SB_1984
-
init2.p11
There are 8 other files named init2.p11 in the archive. Click here to see a list.
.SBTTL INIT2 - initialization...phase 2(post CHK11)
; 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) 1982,1981, 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
; 4(003) RLS CHANGE INIT OF FREE STORAGE TO ACCOMODATE NEW STGMAN
; 4(004) RLS Transform static flow control to static/line control
VINIT2=004
VEDIT=VEDIT+VINIT2
.SBTTL DN60 - start the crock
; here when check11 is complete.
DN60: MTPS #BR7 ;ensure privacy for a while
MOV #L0,R1 ;1st allocate necessary line blocks
MOV NSLINS,R2 ;get actual # of lines
BGT 1$
STOPCD BUG
1$: CMP R2,#NLINES ;limit to allowed number
BLE 2$
MOV #NLINES,R2
MOV R2,NSLINS
2$: MOV #LINTBL,R3
5$: MOV R1,(R3)+ ;stuff lcb ptr in global block
MOV R1,R4
CALL INITLB ;make it pure as the driven snow
ADD #LB.SIZ,R1 ;advance to next
SOB R2,5$
;now allocate chunks
MOV #CHFST,CHTAIL ;init free list tail ptr
CLR R5 ;in case TRCCNK is turned on
MOV R1,CHLOW ;save location of lowest chunk
10$: MOV R1,R0
ADD #CHSIZE,R1 ;advance to next chunk
CMP R1,PHYLIM ;check for memory bound
BHIS 13$ ;whole chunk not within bounds
MOV R0,CHHGH ;remember in case last
CALL RETCH ;put this chunk on free list
BR 10$
; here when the list of free chunks is all built.
13$: MOV CHFREC,TOTCNT ;set total available chunks
MOV CHFREC,FRECNT ;they are all free initially
; now build the tentsk task. this task interacts with
; the pdp-10 via the configured interface hardware driver.
CALL GETTCB ;get a task control block
BCS 15$ ;failed, fatal error.
MOV R0,TCBP1 ;TENTSK is the highest priority task
MOV #TENTSK,TCPC(R0);set initial pc
BIS #BR4,TCPS(R0) ;set its priority level
CLR R4 ;no line block associated with TENTSK
CALL STKINI ;init the task stack
MOV R0,TCDLDR ;set task ptr in global
CLR TCBP2 ;no medium priority tasks
CLR TCBP3 ;or low order either
; now wait for the pdp-10 to come on line
14$: CLR TENALV ;make sure there are no false starts
MOV #-6,DLGONE ;pretend 10 has been down for awhile
JMP SKDINI ;and go init the scheduler
; 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
.SBTTL INITLB - make line blocks pristine pure
INITLB: SAVE <R0,R1> ;make a line block pristine pure
MOV R4,R0 ;R4/lcb ptr
SAVE LB.LNU(R4) ;save the line number
MOV #LB.SZ0/2,R1
10$: CLR (R0)+
SOB R1,10$
RESTOR R0 ;replace the line number
MOV R0,LB.LNU(R4) ;get line number in line block
ASL R0 ;make word offset
MOV LINCSR(R0),LB.SLA(R4) ;store csr address
MOV LINVEC(R0),LB.SLV(R4) ;store vector address
MOV LINTYP(R0),LB.TYP(R4) ;line driver type
CALL LDLENV ;stuff line driver entry vectors
MOV #LF.DAC,LB.FGS(R4);makes this line ready for enabling
RESTOR <R1,R0>
RETURN
LDLENV: SAVE <R4,R1,R2> ;load line block with line driver entry pts
;R4/line block ptr
MOV #LB$ENL,R1 ;set up line driver entry points
MOV LB.TYP(R4),R2 ;get line driver type
ASL R2
MOV DRVTBL(R2),R2 ;get entry vector block from line driver
ADD #LB.ENV,R4 ;ptr to block in line block
10$: MOV (R2)+,(R4)+ ;xfer to line block
SOB R1,10$
RESTOR <R2,R1,R4> ;get lcb back
RETURN
.MACRO DRVE DRIVER
.IF DF,DRIVER
DRIVER
.IFF
BUGGER
.ENDC ;.IF DF,DRIVER
.ENDM
DRVTBL: BUGGER ;ptr's to line driver entry vector blocks
DRVE DQENT ;DQ11
DRVE KDPENT ;KMC/DUP
DRVE DUPENT ;DUP
BUGGER: ;default entry vector for non-resident drivers
.REPT T$ENL
BUGHLT
.ENDR