Google
 

Trailing-Edge - PDP-10 Archives - BB-X140B-BB_1986 - 10,7/cor/scnser.cor
There are 2 other files named scnser.cor in the archive. Click here to see a list.
 INS 53/16
	LTLTIM==:17		;TIMEOUT FIELD FOR LTLACK
		TTDTIM==:6	  ;HOW LONG TO WAIT FOR LTLACK TO BE CLEARED
 INS 58/21
	IFN FTKL10,<
	LDPTDT::POINT	4,LDBTTD(U),17		;POINTER TO TTDINT IRMA-LIKE TIMEOUT
	>
 REP 10/49
		SKIPL	LDBBY3(U)	;HAS THE STATUS OF DEFERRED ECHO CHANGED?
		JRST	RECIN3		;NO, DON'T MUNG IT
		MOVSI	T1,L3LDMC	;YES, GET THE CHANGE BIT
		ANDCAM	T1,LDBBY3(U)	;CLEAR FOR NEXT TIME
		PUSH	P,T3		;SAVE THE INCOMING CHARACTER
		MOVEI	T3,MC.DEN	;ASSUME TURNING IT ON
		MOVE	T2,LDBBYT(U)	;GET DEFERRED ECHO BITS
		TRNN	T2,L1RDEM	;RIGHT ASSUMPTION?
		MOVEI	T3,MC.DEF	;NO, CLEARING IT
		PUSHJ	P,RECINA	;DO IT TO IT
		POP	P,T3		;RESTORE OUR INPUT CHARACTER
	RECIN3:	MOVE	T1,LDBDCH(U)	;CARRY DEVICE BITS IN LH.
 WIT
		MOVE	T1,LDBDCH(U)	;CARRY DEVICE BITS IN LH.
 REP 25/49
		JRST	RECIN4		;NO.
 WIT
		JRST	RECIN3		;NO.
 REP 30/49
	RECIN4:	SKIPL	LDBATR(U)	;EIGHT-BIT TERMINAL?
 WIT
	RECIN3:	SKIPL	LDBATR(U)	;EIGHT-BIT TERMINAL?
 REP 38/49
	RECIN5:	PUSHJ	P,SPCHEK	;SEE IF IT'S SPECIAL. SET T1 UP.
 WIT
	RECIN4:	PUSHJ	P,SPCHEK	;SEE IF IT'S SPECIAL. SET T1 UP.
 REP 29/54
		PUSHJ	P,RECIN5	;RECEIVE AS SOMETHING OTHER THAN OOB
 WIT
		PUSHJ	P,RECIN4	;RECEIVE AS SOMETHING OTHER THAN OOB
 REP 38/54
		PJRST	RECIN5		;STORE AND RETURN
 WIT
		PJRST	RECIN4		;STORE AND RETURN
 REP 62/54
		PUSHJ	P,RECIN5	;STORE FIRST CHARACTER
 WIT
		PUSHJ	P,RECIN4	;STORE FIRST CHARACTER
 INS 23/94
	IFN FTKL10,<
		HRRZ	T2,LDBISR(U)	;GET ISR DISPATCH
		CAIN	T2,TTDDSP##	;RSX20F LINE?
		PUSHJ	P,TTDSIN##	;YES, DO HUNG CHECKING FOR -20F LINES
	> ;END IFN FTKL10
 REP 34/128
		MOVSI	T1,L3LDMC	;DEFERRED ECHO MODE CHANGED
		IORM	T1,LDBBY3(U)	;PRETEND SO L1LDEM STAYS IN SYNCH WITH L1RDEM
 WIT
		LDB	T1,LDPDEM	;RECINT'S DEFERRED ECHO MODE
		DPB	T1,[POINT 1,LDBBYT(U),^L<(L1LDEM)>] ;KEEP IN SYNCH WITH XMTECH
 REP 16/207
		PUSHJ	P,CLRDVL##	;NO JOB OWNS IT ANY MORE.
 WIT
		PUSH	P,W		;SOME CALLERS EXPECT THIS TO BE PRESERVED
		PUSHJ	P,CLRDVL##	;NO JOB OWNS IT ANY MORE.
		POP	P,W		;RESTORE BLOWN AC
 REP 44/232
		PUSHJ	P,TTCCHK	;CHECK FOR A CHARACTER PRESENT
		  SKIPA			;NONE PRESENT, GO WAIT
		POPJ	P,0		;YES. RETURN
		MOVE	S,[XWD	IOW,IOACT]	;SET BOTH ON TO AVOID RACE WITH COMPLETION
		IORB	S,DEVIOS(F)	;SO NOT GO INTO TI WITH SOMETHING THERE
		PUSHJ	P,TIWAIT	;NO. GO WAIT FOR ONE
		TRNE	S,IODERR	;GOT A ^C?
		POPJ	P,		;YES, THAT'S ENOUGH
		JRST	TWAITC		;MAKE SURE ONE THERE IN CASE OF ^C
 WIT
		PUSHJ	P,TTCCHK	;CHECK FOR A INPUT BEING PRESENT
		  JRST	TWATCK		;BE SURE
		POPJ	P,		;INPUT PRESENT, RETURN

	TWATC1:	PUSHJ	P,TIWAIT	;NO. GO WAIT FOR ONE.
		TRNE	S,IODERR	;GOT A ^C?
		POPJ	P,		;YES, INPUT PRESENT
		PUSHJ	P,CKATTI	;MAKE SURE DIDN'T DETACH DURING WAIT
		PUSHJ	P,TTCCHK
		  JRST	TWATCK
		POPJ	P,

	TWATCK:	MOVE	S,[XWD IOW,IOACT]	;FLAG ACTIVE AND WAITING SO
		IORB	S,DEVIOS(F)	;INTERRUPT WILL NOT FIND HIM ACTIVE
		PUSHJ	P,TTCCHK	;BUT NOT WAITING.  THEN LOOK AGAIN
		  JRST	TWATC1		;NOTHING ARRIVED SINCE LAST TEST
		MOVE	S,[XWD IOW,IOACT]	;SOMETHING DID SNEAK IN!
		ANDCAB	S,DEVIOS(F)	;SO FORGET ABOUT WAITING
		POPJ	P,
 SUM 182921