Google
 

Trailing-Edge - PDP-10 Archives - BB-J724B-SM_1982 - sources/init.p11
There are 5 other files named init.p11 in the archive. Click here to see a list.
.SBTTL	INIT - initialization for line blocks,DQ11S,KMC11S,DUP11S,DMC11S

; this once-only subroutine is called from check11 for each
; device(controlled by assembly conditionals in configuration file.
; after check11 has finished, this subroutine is overlayed by
;  free storage.

.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 HISRORY


VINIT=001

VEDIT=VEDIT+VINIT
	.SBTTL		define line blocks

NL=0

	.REPT	NLINES
	DEFLCB	\NL
NL=NL+1
	.ENDR
	.SBTTL		initialization of dq11s

; subroutine called by check11 to check the dq11

.IF NE,FT.DQ			;dq's are the line drivers for dn8x series

CKADQ1:	MOV	R1,-(SP)	;SAVE R1
	MOV	R2,-(SP)	;SAVE R2
	MOV	R3,-(SP)	;SAVE R3
	MOV	R4,-(SP)	;SAVE R4
	MOV	#EBCENQ,R1	;CHAR TO MATCH
	CALL	CKDQSC		;TRY TO MATCH THIS CHAR
	BCS	15$		;FAILED, PRINT MESSAGE
	MOV	#EBCETX,R1
	CALL	CKDQSC
	BCS	15$		;FAILED
	MOV	#EBCETB,R1
	CALL	CKDQSC
	BCS	15$		;FAILED.
11$:	TST	6(R0)		;IS DQ SET FOR SYNC INTERRUPTS ?
	BMI	12$
	MOV	R0,-(SP)	;SAVE BLOCK POINTER
	BIS	#CKFERR,CHKFLG	;FLAG WE DON'T LIKE IT
	CALL	CKDIDT		;IDENTIFY CULPRIT
	JSR	R0,CKTCRL
	.ASCIZ	\ doesn't interrupt for sync chars\
	.EVEN
	MOV	(SP)+,R0	;GET BLOCK POINTER BACK
12$:	MOV	NSLINS,R4	;GET NUMBER OF THIS DQ11
	CMP	R4,#NLINES	;check for max desired lines
	BGE	14$		;ignore extras

13$:	ASL	R4		;LINE NUMBER * 2
	MOV	0(R0),LINCSR(R4) ;REMEMBER CSR ADDRESS
	MOV	2(R0),LINVEC(R4) ;REMEMBER VECTOR ADDRESS
	MOV	#DQDRV,LINTYP(R4) ;set line driver type
	INC	NSLINS		;count this synch line
	INC	NDQ11		;increment number of dq11s
14$:	MOV	(SP)+,R4	;RESTORE R4
	MOV	(SP)+,R3	;RESTORE R3
	MOV	(SP)+,R2	;RESTORE R2
	MOV	(SP)+,R1	;RESTORE R1
	RETURN

; HERE WHEN THE SPECIAL CHARACTERS ARE NOT RIGHT.

15$:	MOV	R0,-(SP)	;SAVE DQ11 BLOCK POINTER
	CALL	CKDIDT		;TYPE DEVICE NAME
	JSR	R0,CKTCRL	;TYPE FOLLOWING MESSAGE
	.ASCIZ	\ Special characters should be 055, 003 and 046, \
	.EVEN
	JSR	R0,CKTCRL
	.ASCIZ	\     but are: \
	.EVEN
	MOV	(SP),R3		;GET BLOCK POINTER
	MOV	10(R3),R0	;GET FIRST CHARACTER
	CALL	CKTOCT		;TYPE FIRST CHAR
	JSR	R0,CKTSTR	;TYPE COMMA
	.ASCIZ	\, \
	.EVEN
	MOV	(SP),R3		;GET BLOCK POINTER
	MOV	12(R3),R0	;GET SECOND CHARACTER
	CALL	CKTOCT		;TYPE SECOND CHAR
	JSR	R0,CKTSTR	;TYPE "AND"
	.ASCIZ	\ and \
	.EVEN
	MOV	(SP),R3		;GET BLOCK POINTER
	MOV	14(R3),R0	;GET THIRD CHARACTER
	CALL	CKTOCT		;TYPE THIRD CHAR
	MOV	(SP)+,R0	;RESTORE BLOCK POINTER
	BIS	#CKFERR,CHKFLG	;FLAG ERROR IN CHECK11
	JMP	11$		;GO DO THE OTHER TESTS
; SUBROUTINE TO CHECK SPECIAL CHARACTERS IN THE DQ11

CKDQSC:	CMP	R1,10(R0)	;IS CHAR RIGHT ?
	BEQ	11$
	CMP	R1,12(R0)	;TRY NEXT SLOT
	BEQ	11$
	CMP	R1,14(R0)
	BEQ	11$

; HERE WHEN SPECIAL CHARACTERS ARE WRONG.

	SEC			;FLAG ERROR
	RETURN

; HERE WHEN SPECIAL CHARACTER IS RIGHT.

11$:	CLC			;FLAG SUCCESS
	RETURN

.ENDC	;.IF NE,FT.DQ
	.SBTTL		initialization for the dup11s

; this once-only subroutine is called from check11 for each
;  dup11.

.IF NE,FT.DUP!FT.KDP

CKAUP1:	MOV	R1,-(SP)	;SAVE R1
	MOV	R2,-(SP)	;SAVE R2
	MOV	R3,-(SP)	;SAVE R3
	MOV	R4,-(SP)	;SAVE R4
11$:	MOV	NSLINS,R4	;GET NUMBER OF THIS DUP11
	CMP	R4,#NLINES	;check for enough dups
	BGE	13$		;ignore extras

; HERE WHEN WE CAN USE THIS DUP11 LINE.

12$:	ASL	R4		;LINE NUMBER * 2
	MOV	0(R0),LINCSR(R4) ;REMEMBER CSR ADDRESS
	MOV	2(R0),LINVEC(R4) ;REMEMBER VECTOR ADDRESS

.IF NE,FT.KDP
	MOV	#KDPDRV,LINTYP(R4) ;set line driver type
.IFF
	MOV	#DUPDRV,LINTYP(R4) ;set line driver type
.ENDC	;.IF NE,FT.KDP

	INC	NSLINS		;count this synch line
	INC	NDUP11		;increment number of dup11
13$:	MOV	(SP)+,R4	;RESTORE R4
	MOV	(SP)+,R3	;RESTORE R3
	MOV	(SP)+,R2	;RESTORE R2
	MOV	(SP)+,R1	;RESTORE R1
	RETURN

.ENDC	; .IF NE,FT.DUP!FT.KDP
	.SBTTL		check DMC11

; subroutine called by check11 to check the DMC11

.IF NE,FT.DMC ;IF ON A DN22
CKAMC1:
	SAVE	<R1,R2,R3,R4>	;SAVE SOME REGISTERS
	MOV	DMCSR,R4	;ALREADY HAVE ONE?
	BNE	10$		;YES
	MOV	0(R0),DMCSR	;SAVE CSR
	MOV	2(R0),DMCVEC	;SAVE INTERRUPT VECTOR ADDRESS
10$:	RESTORE	<R4,R3,R2,R1>
	RETURN
.ENDC ;END IF NE,FT.DMC
; SUBROUTINE CALLED BY CHECK11 TO CHECK THE KMC11S

.IF NE,FT.KDP

CKAMD1:	MOV	R1,-(SP)	;SAVE R1
	MOV	R2,-(SP)	; AND R2
	MOV	R3,-(SP)	; AND R3
	MOV	R4,-(SP)	; AND R4
	MOV	NKMC11,R4	;NUMBER OF KMC11S ALREADY
	CMP	R4,#NKMCR	;check no. kmc's available
	BGE	13$		;ignore extras

; HERE IF THERE ARE NOT TOO MANY KMC11S

11$:	ASL	R4		;KMC11 NUMBER * 2
	MOV	0(R0),R3	;POINT TO CSR
	MOV	#MD.CLR,(R3)	;CLEAR MICROPROCESSOR
	CLR	(R3)		;TURN OFF CLEAR BIT
	CLR	2(R3)		;CLEAR SEL 2
	CLR	4(R3)		;CLEAR SEL 4
	CLR	6(R3)		;CLEAR SEL 6
	MOV	#MD.RMO,(R3)	;SELECT CRAM
	MOV	6(R3),R1	;FETCH LOCATION 0
	CMP	#<B15+B8>,R1	;BRANCH TO ZERO?
	BNE	14$		;NO, CRAM NOT LOADED.
	MOV	#1,4(R3)	;LOCATION 1
	MOV	#MD.RMO,(R3)	;SELECT CRAM
	MOV	6(R3),R1	;FETCH LOCATION 1
	CMP	#1,R1		;CORRECT VERSION NUMBER?
	BNE	14$		;NO, FAIL.
	INC	NKMC11		;YES, WE HAVE A KMC11
	MOV	0(R0),MDCSR(R4)	;REMEMBER CSR ADDRESS
	MOV	2(R0),MDVEC(R4)	; AND VECTOR ADDRESS
	MOV	#MHCODE-10,R1	;START OF VERSION NUMBER
	MOV	#MDVER,R2	;PLACE TO PUT IT
	MOV	#4,R3		;LENGTH OF VERSION NUMBER
12$:	MOV	(R1)+,(R2)+	;COPY VERSION NUMBER
	SOB	R3,12$		; ... ALL OF IT.
13$:	MOV	(SP)+,R4	;RESTORE R4
	MOV	(SP)+,R3	; AND R3
	MOV	(SP)+,R2	; AND R2
	MOV	(SP)+,R1	; AND R1
	RETURN

; ERROR TYPEOUTS FOR KMC11

14$:	MOV	NKMC11,R1
	INC	R1
	BIC	#177770,R1
	ADD	#'0,R1
	MOVB	R1,15$
	JSR	R0,CKTCRL
	.ASCII	/? KMC11 #/
15$:	.ASCIZ	/0 microcode is invalid /
	.EVEN
	BIS	#CKFERR,CHKFLG	;FLAG AN ERROR
	BR	13$
.ENDC ;.IF NE,FT.KDP