Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99e-bb - scnser.c11
There is 1 other file named scnser.c11 in the archive. Click here to see a list.
 REP 32/53	;11C1
		CAIE	T1,TTPBRK	;TIME FOR A WAKEUP ON G.P.S?
		SKIPN	T2,LDBPBK(U)	;GET AND TEST BREAK CHARACTER WORD
		JRST	RCVWAK		;NOTHING SPECIFIED, BREAK ON ALL
		ANDI	T3,377		;CLEAR NINTH BIT FOR TEST
	REPIM1:	LSHC	T1,9		;GET TEST CHARACTER
 WIT
		PUSHJ	P,PIMCKB	;GO SEE IF CHARACTER IS A BREAK CHARACTER
		  JRST	[MOVE	T1,LDBTIC(U)	;NO, GET COUNT AGAIN
			 CAIE	T1,TTPBRK	;TIME FOR A WAKEUP ON G.P.S?
			 POPJ	P,		;NO, JUST DISMISS
			 JRST	RCVWAK]		;YES, WAKEUP AND DISMISS
		AOS	LDBBKC(U)	;IT WAS, INCREMENT THE BREAK COUNT
		JRST	RCVWAK		;GO WAKE AND DISMISS

	;ROUTINE TO CHECK TO SEE IF A CHARACTER IS PART OF THE CURRENT
	;PIM BREAK SET.  CALL WITH CHARACTER IN T3.
	;SKIPS IF IT IS A BREAK CHARACTER. USES T1-T3.
	PIMCKB:	SKIPN	T2,LDBPBK(U)	;GET THE CURRENT MASK
		JRST	CPOPJ1##	;IF ZERO, ALL CHARACTERS BREAK
		ANDI	T3,377		;CLEAR NINTH BIT FOR TEST
	PIMCK1:	LSHC	T1,9		;GET TEST CHARACTER
 REP 41/53	;11C2
		   JRST	RCVWAK		;YES, BREAK CHAR, WAKE AND DISMISS
		JUMPN	T2,REPIM1	;NO, TRY NEXT
		JRST	CPOPJ##		;DONE, DISMISS INTERRUPT.
 WIT
		   JRST	CPOPJ1##	;BREAK CHAR, GIVE SKIP RETURN
		JUMPN	T2,PIMCK1	;NO, TRY NEXT
		POPJ	P,		;IT WASN'T, RETURN NORMAL
 REP 7/95	;11C3
	SPCHEK::MOVE	T1,T3		;COPY CHAR
 WIT
	SPCHEK::LDB	T1,LDPPIM	;GET PIM MODE BIT
		JUMPN	T1,PMCHEK	;SPECIAL CHECK FOR PIM MODE TERMINALS
		MOVE	T1,T3		;COPY CHAR
 INS 35/95	;11C4
	;ROUTINE TO CHECK IF CHARACTER PART OF PIM BREAK CHARACTER.
	;LIKE SPCHEK, BUT SHOULD BE CALLED IF TERMINAL IS IN PIM MODE
	PMCHEK:	PUSHJ	P,PIMCKB	;SEE IF THIS IS A BREAK CHARACTER
		  TDZA	T1,T1		;NOT SPECIAL
		SKIPA	T1,[CHBRK,,0]	;YES, IT IS
		POPJ	P,		;RETURN NOT SPECIAL
		JRST	CPOPJ1		;ELSE GIVE SKIP



 REP 1/126	;11C5
	;ROUTINE TO GET/SET TERMINAL TYPE

	TOPTTC:	JRST	TORTTC		;GET TERMINAL TYPE
		MOVE	T2,P2		;GET USER'S ARGUMENT
		PUSHJ	P,TTUTYP##	;SET TERMINAL CHARACTERISTICS
		  JRST	TOPX2		;UNKNOWN TERMINAL TYPE
		JRST	CPOPJ1##	;GOOD RETURN

	TORTTC:	LDB	T1,LDPTTT	;GET TERMINAL TYPE
		TRZE	T1,100		;CUSTOMER DEFINED TERMINAL TYPE ?
		MOVNS	T1		;YES
		MOVE	T1,TTTWDT##(T1)	;GET TERMINAL NAME
		POPJ	P,		;STORE ANSWER FOR THE USER AND RETURN
 WIT
	;ROUTINE TO GET/SET PIM BREAK SET.

	TOPPBS:	JRST	TORPBS		;GET PIM BREAK SET
		MOVEM	P2,LDBPBK(U)	;STORE THE NEW BREAK SET
		LDB	T1,LDPPIM	;CHECK FOR PIM
		SKIPE	T1		;IF IN PIM,
		PUSHJ	P,CHKBKC	;CALCULATE THE NEW NUMBER OF BREAK CHARACTERS
		JRST	CPOPJ1##	;RETURN

	TORPBS:	MOVE	T1,LDBPBK(U)	;GET THE BREAK SET
		POPJ	P,
 INS 17/126	;11C6
	;ROUTINE TO GET/SET TERMINAL TYPE

	TOPTTC:	JRST	TORTTC		;GET TERMINAL TYPE
		MOVE	T2,P2		;GET USER'S ARGUMENT
		PUSHJ	P,TTUTYP##	;SET TERMINAL CHARACTERISTICS
		  JRST	TOPX2		;UNKNOWN TERMINAL TYPE
		JRST	CPOPJ1##	;GOOD RETURN

	TORTTC:	LDB	T1,LDPTTT	;GET TERMINAL TYPE
		TRZE	T1,100		;CUSTOMER DEFINED TERMINAL TYPE ?
		MOVNS	T1		;YES
		MOVE	T1,TTTWDT##(T1)	;GET TERMINAL NAME
		POPJ	P,		;STORE ANSWER FOR THE USER AND RETURN



 REP 49/131	;11C7
		EXP	<0>B5+<TOP.SA>+<[POINT 36,LDBPBK(U),35]>		;1037
 WIT
		EXP	<0>B5+<TOP.SA+TOP.RT>+<TOPPBS>				;1037
 INS 34/156	;11C8
		SETZ	T1,		;MAKE A ZERO VALUE
		...DPB	T1,LDPPIM	;CLEAR THE PIM MODE FLAG
		PUSHJ	P,CHKBKC	;RECALCULATE COUNT OF BREAK CHARACTERS
 INS 25/172	;11C9
		SETZM	LDBPBK(U)	;NO MORE PIM BREAK SET
 INS 35/172	;11C10
		SKIPE	U		;IF ATTACHED,
 INS 48/173	;11C11
		SETZM	LDBPBK(U)	;NO MORE PIM BREAK SET
 INS 21/191	;11C12
		MOVE	T2,LDBBKM(U)	;AND OLD VALUE OF BIT
 REP 25/191	;11C13
	UUOLD1:	MOVEI	T1,0		;MAKE LDB AGREE WITH S
 WIT
	UUOLD1:	XOR	T2,LDBBKM(U)	;GET CHANGE MASK
		PUSH	P,T2		;SAVE FOR LATER
		MOVEI	T1,0		;MAKE LDB AGREE WITH S
 REP 42/191	;11C14
		CAME	T2,T1		;DON'T SEND STATUS IF NO CHANGE
 WIT
		XORB	T1,T2		;GET CHANGE MASK
		EXCH	T2,(P)		;SAVE THIS ONE, GET PREVIOUS MASK
		TLNN	T2,LDLBKM	;IF CHANGED BREAK STATUS,
		TLNE	T1,LDLPIM	;OR CHANGED PIM STATUS,
		PUSHJ	P,CHKBKC	;UPDATE THE BREAK COUNT
		POP	P,T1		;RESTORE CHANGE MASK
		SKIPE	T1		;DON'T SEND STATUS IF NO CHANGE
 REP 11/193	;11C15
		SKIPE	LDBTOC(U)	;IF OUTPUT IN PROGRESS,
		PUSHJ	P,TOWAT1	;WAIT FOR OUTPUT TO FINISH
		PUSHJ	P,CLRPCT	;RESET THE "STOP" LINE COUNTER
 WIT
		SKIPE	LDBTOC(U)	;IF NO OUTPUT IN PROGRESS,
		PUSHJ	P,PTBTCH##	;AND TERMINAL IS NOT A PTY
		  PUSHJ	P,CLRPCT	;RESET THE "STOP" LINE COUNTER
 SUM 136035