Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99g-bb - dndz11.c10
There is 1 other file named dndz11.c10 in the archive. Click here to see a list.
 REP 1/1	;10C1
	.SBTTL	DNDZ11	--  DZ11 DRIVER  20 SEP 84
 WIT
	.SBTTL	DNDZ11	--  DZ11 DRIVER  4 DEC 84
 REP 8/1	;10C2
	VRDZ11=042			;FILE EDIT NUMBER
 WIT
	VRDZ11=045			;FILE EDIT NUMBER
 REP 10/13	;10C3
	DZSPD:	PIOFF				; DONT BOTHER ME
		MOV	R1,-(P)			; SAVE SPEED
		SWAB	R1			; SWAP HALVES TO MAKE SURE
		CMP	R1,(P)+			; THAT WE AREN'T SETTING SPLIT SPEED.
		BNE	99$			; IF WE ARE, DONT SET SPEED
		CMP	#B.134,R1		; IS THIS A 2741??
		BEQ	96$			; IF SO, THEN SPECIAL BITS
		BIC	#^C377,R1		; CLEAR EXTRA BITS
		BEQ	95$			; ZERO BAUD == SPECIAL CODE
		MOVB	DZSPDT(R1),R1		; GET DZ VERSION
		BMI	99$			; BAD SPEED, PACK IT IN
		BIS	#DZ.CL8!DZ.2SB!DZ.RON,R2; 2 STOP BITS, 8 DATA BITS
	.IF EQ FT2BIT

						; 2 IS HARDWARE NUMBER FOR 110 BAUD
		CMP	R1,#2			; FASTER THAN 110?

		BLOS	.+6
		BIC	#DZ.2SB,R2		; CLEAR STOP BIT
	.ENDC
	97$:	BIC	#^C17,R1		; CLEAR EXTRA BITS
		SWAB	R1			; POSITION BITS
		ADD	R2,R1
		MOV	R1,DZ.RBF(R0)		; SET LINE SPEED
	98$:	PION
		CLC				; CLEAR ERROR FLAG
 WIT
	DZSPD:	PIOFF				;DONT BOTHER ME
		MOV	R1,-(P)			;SAVE SPEED
		SWAB	R1			;BELIEVE ONLY TERMINAL TRANSMIT SPEED
		MOVB	R1,(P)			;POSITION FOR RETURN SPEED
		CMP	#B.134,R1		;IS THIS A 2741??
		BEQ	96$			;IF SO, THEN SPECIAL BITS
		BIC	#^C377,R1		;CLEAR EXTRA BITS
		BEQ	95$			;ZERO BAUD == SPECIAL CODE
		MOVB	DZSPDT(R1),R1		;GET DZ VERSION
		BMI	99$			;BAD SPEED, PACK IT IN
		BIS	#DZ.CL8!DZ.2SB!DZ.RON,R2; 2 STOP BITS, 8 DATA BITS
	.IF EQ FT2BIT
		CMP	R1,#2			;FASTER THAN 110?
		BLOS	.+6
		BIC	#DZ.2SB,R2		;CLEAR STOP BIT
	.ENDC
	97$:	BIC	#^C17,R1		;CLEAR EXTRA BITS
		SWAB	R1			;POSITION BITS
		ADD	R2,R1
		MOV	R1,DZ.RBF(R0)		;SET LINE SPEED
	98$:	MOV	(P)+,R1			;RETURN ACTUAL SPEED VALUE
		PION				;RESTORE PI LEVEL
		CLC				;CLEAR ERROR FLAG
 REP 39/13	;10C4
	96$:					; HERE IF IT'S A 2741
		BIS	#DZ..OP!DZ.PEN!DZ.CL6!DZ.RON,R2
						; 6 BIT CHARS, AND ENABLE THE RECIEVER
		BIC	#^C377,R1		; CLEAR EXTRA BITS
		MOVB	DZSPDT(R1),R1		; LOAD THE SPEED,
		BR	97$			; AND BACK TO MAIN-LINE CODE


	99$:	PION
		SEC
		RTS	PC			; RETURN CARRY SET. I.E. ERROR

	95$:	MOV	R2,DZ.RBF(R0)		; SELECT LINE, BUT NO RECIEVE ACTIVE
		BR	98$			; RETURN


 WIT
	96$:					;HERE IF IT'S A 2741
		BIS	#DZ..OP!DZ.PEN!DZ.CL6!DZ.RON,R2
						; 6 BIT CHARS, AND ENABLE THE RECIEVER
		BIC	#^C377,R1		;CLEAR EXTRA BITS
		MOVB	DZSPDT(R1),R1		;LOAD THE SPEED,
		BR	97$			;AND BACK TO MAIN-LINE CODE


	99$:	TST	(P)+			;PITCH BOGUS SPEED VALUE
		PION				;RESTORE PI LEVEL
		SEC				;SET ERROR FLAG
		RTS	PC			;RETURN CARRY SET. I.E. ERROR

	95$:	MOV	R2,DZ.RBF(R0)		;SELECT LINE, BUT NO RECIEVE ACTIVE
		BR	98$			;RETURN
 REP 19/18	;10C5
	.IF EQ DGUTS
 WIT
	.IF NE DGUTS
 SUM 187319