Google
 

Trailing-Edge - PDP-10 Archives - BB-F492Z-DD_1986 - 10,7/703anf/dnrda.p11
There are 3 other files named dnrda.p11 in the archive. Click here to see a list.
.SBTTL	DNRDA - ASCII RDE DRIVERS  11 DEC 84

;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1977,1978,1979,1980,1981,1984 BY DIGITAL EQUIPMENT CORP., MAYNARD, MASS.

VRRDA=010			;FILE EDIT NUMBER

.IF NE FT.RDA


;DDB IS DEFINED IN DNTTY.P11 CAUSE IT LOOKS THE SAME (ALMOST) AS A TTY.
;
;IN FACT, RDA SERVICE IS MOSTLY DRIVEN AS A "TTY" DEVICE

RDASER:	CMP	#RDAMML,DB.MML(J)	; SEE IF MESSAGE IS TOO LONG
	BHIS	10$			; FINE
	MOV	#RDAMML,DB.MML(J)	; USE OUR LENGTH
10$:	MOVB	#B0,DB.DCM(J)		; IMAGE MODE FOR EVER
	JSR	PC,DVCCFM		; CONNECT CONFIRM IF NEEDED
	BIT	#DS.CON,(J)		; ARE WE STILL THERE ??
	BNE	20$			; YES, LETS GO TO IT
	BIC	#DS.XDS,@J		;CLEAR STATUS BIT IN CASE AUTO DIAL USING IT
	RTS	PC			; NO, THIS PACKET GETS TOSSED OUT

20$:	JSR	PC,DVXDRQ		; ASK FOR MORE DATA IF NEEDED
	BIS	#TS.IMI+TS.IMO,DB.DCS(J); REMIND ME THAT I AM IMAGE MODE
	TST	DB.OBF(J)		; DATA FROM 10??
	BNE	27$			; YES
	JMP	TTYICK			; USE DNTTY "INPUT" PROCESSING
27$:	JMP	TOGMSG			; USE DNTTY "OUTPUT" PROCESSING


;RDATIM: USES TTYTIM AND CTYTIM CODE
RDDZIN:
RDDHIN:	BIT	#DHROVR,R1		; CHECK FOR OVERRUN
	BNE	99$			; YES, DUMP CHARS
	BIT	#DHRFER,R1		; FRAME ERROR ??
	BNE	99$			; YES, DUMP THIS ONE ALSO
	JSR	PC,TTYINP		; USE TTY ROUTINE FOR TASK INTERFACE
99$:	RTS	PC			; DONE FOR NOW


RDDZOU=TTDZOU
RDDHOU=TTDHOU

.IF NE FT.TSK
.IF NE DN11N
;
;
;	ROUTINE TO SET BITS FOR AN AUTO-DIAL LINE
;
DNSTA:	BIT	#40,DB.DVT(J)	;AUTO-DIAL LINE?
	BEQ	99$		;NO
	BITB	#DNDIAL,DB.DNS(J)	;DIAL STILL IN PROGRESS?
	BNE	99$		;YES,DON'T SET STATUS YET
	MOV	@(P),R0		;GET BITS
	BIS	R0,DB.DNR(J)	;SET THE BITS IN STATUS WORD
99$:	ADD	#2,(P)		;BYPASS ARGUEMENT
	RTS	PC		;RETURN
;ROUTINE TO CHECK FOR A STATUS REQUEST IN RDXSER
;THESE REQUESTS WOULD NORMALLY BE SENT TO THE
;10 FOR TTY LINES.

RDXSTA:	BIT	#DS.XDS,@J	;NEED TO HANDLE STATUS CHANGE?
	BEQ	35$		;NO
	BIC	#DS.XDS,@J	;DON'T KEEP COMING THROUGH HERE
	BIT	#TS.DTR,DB.DCS(J)	;LINE ENABLE UP?
	BNE	40$		;YES, AUTODIAL ANSWER, OR A LINE DISCONNECT
	MOV	DB.LCB(J),R0
	CMPB	#LCS.LC,LC.STA(R0) ;LOST CARRIER?
	BEQ	45$		;YES
	CMPB	#LCS.HG,LC.STA(R0)
	BEQ	45$		;HUNG-UP
	CMPB	#LCS.RG,LC.STA(R0)
	BNE	60$		;FORGET IT RING NOT UP
	BIS	#TS.DTR,DB.DCS(J) ;WANT DTR.  WILL BE DONE BY
				;CLOCK DSR
	JSR	PC,DNSTA	;IF AUTO-DIAL,SET CALL ANSWERED
	.WORD	DNRANS
30$:	JSR	PC,WAKEPP	;WAKE THE APPROPRIATE TASKS
35$:	RTS	PC
40$:			;IF AUTO-DIAL THE CALL MAY HAVE BEEN ANSWERED
	MOV	DB.LCB(J),R0
	CMPB	#LCS.DF,LC.STA(R0) ;DIAL FAILED
	BEQ	45$		;YES
	CMPB	#LCS.LC,LC.STA(R0) ;LOST CARRIER?
	BEQ	45$		;YES
	CMPB	#LCS.HG,LC.STA(R0) ;HUNG UP
	BNE	50$		;NO
45$:	JSR	PC,DNSTA	;DROPPED CARRIER OR NEVER HAD CALL
				;ANSERED IN FIRST PLACE
	.WORD	DNRERR+DNRENC	;NO CARRIER
	BR	30$		;WAKE UP TASK
50$:	JSR	PC,DNSTA	;SET CALL ANSWERED
	.WORD	DNRANS
	BR	30$		;WAKE TASK

60$:	JSR	PC,DNSTA	;SEND DN STATUS OF AUTO DIAL LINE
	.WORD	DNRERR+DNREAD	;AUTO DIAL FAILURE
	BR 	30$		;INFORM TASK AND CONTINUE
.ENDC ;IF NE DN11N
.ENDC ;IF NE FT.TSK
.ENDC ;IF NE FT.RDA