Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99g-bb - netser.c09
There is 1 other file named netser.c09 in the archive. Click here to see a list.
 REP 19/80	;09C1
	EBI2BI::SETZ	T1,		;CLEAR THE OUTPUT
		MOVE	T3,[POINT 7,T1,35]	;OUTPUT BYTE POINTER
	EBI2B1:	SOJL	P4,CPOPJ##	;EXIT IF THE END OF DATA
		ILDB	T2,P1		;GET THE NEXT CHARACTER
		DPB	T2,T3		;STORE THE NEXT DIGIT
		TRNN	T2,200		;IS THE NUMBER EXTENDED
		POPJ	P,		;NO, EXIT
		ADD	T3,[7B5]	;YES, STEP LEFT ONE 7 BIT BYTE
		JRST	EBI2B1		;CONTINUE
 WIT
	EBI2BI::SETZB	T1,T2		;INITIALIZE FOR NUMBER-BUILDING LOOP
	EBI2B1:	SOJL	P4,CPOPJ##	;EXIT IF THE END OF DATA
		ILDB	T3,P1		;GET THE NEXT CHARACTER
		TRZN	T3,200		;IS THE NUMBER EXTENDED
		JRST	EBI2B5		;NO, ACCUMLATE END OF NUMBER AND EXIT
		LSH	T3,(T2)		;POSITION NEXT "DIGIT"
		IOR	T1,T3		;AND ACCUMULATE NUMBER
		ADDI	T2,7		;"ADVANCE" ACCUMULATOR-POSITIONER
		JRST	EBI2B1		;CONTINUE

	EBI2B5:	LSH	T3,(T2)		;POSITION NEXT "DIGIT"
		IOR	T1,T3		;AND ACCUMLATE NUMBER
		POPJ	P,		;RETURN WITH BINARY IN T1
 INS 23/140	;09C2
	;NTDCLO	ROUTINE TO PERFORM NORMAL "OUTPUT CLOSE" PROCESSING
	;CALL	MOVE	F,DDB		;DEVICE TO CLOSE OUTPUT ON
	;	PUSHJ	P,NTDCLO	;SAVE "NT", CALL OUT AND WAIT FOR COMPLETION
	;RETURN	CPOPJ			;ALWAYS FROM WAIT1
	;
	NTDCLO::NTSAVE			;RETURN THE "NT" INTERLOCK (WE BETTER HAVE IT)
		PUSHJ	P,OUT##		;FORCE OUT ANY UN-EMPTIED BUFFERS
		PJRST	WAIT1##		;WAIT FOR EVERYTHING TO GO OUT.

 REP 27/141	;09C3
	;NTDCLO	ROUTINE TO PERFORM NORMAL "OUTPUT CLOSE" PROCESSING
	;CALL	MOVE	F,DDB		;DEVICE TO CLOSE OUTPUT ON
	;	PUSHJ	P,NTDCLO	;SAVE "NT", CALL OUT AND WAIT FOR COMPLETION
	;RETURN	CPOPJ			;ALWAYS FROM WAIT1
	;
	NTDCLO::NTSAVE			;RETURN THE "NT" INTERLOCK (WE BETTER HAVE IT)
		PUSHJ	P,OUT##		;FORCE OUT ANY UN-EMPTIED BUFFERS
		PJRST	WAIT1##		;WAIT FOR EVERYTHING TO GO OUT.
 WIT
	;NTDGON	ROUTINE TO SET ERROR WHEN DEVICE HAS "GONE" AWAY
	;CALL	MOVE	F,DDB		;DEVICE WHICH IS KROAKED
	;	PJRST	NTDGON		;MARK ERROR AND RETURN TO UUOCON

	NTDGON::MOVEI	S,IODERR!IODTER	;DEVICE AND DATA ERRORS
		IORB	S,DEVIOS(F)	;ASSERT ERROR FLAGS
		POPJ	P,		;RETURN (PRESUMABLY TO UUOCON)
 REP 30/163	;09C4
		MOVE	T1,DEVAIO(F)	;NOW SEE IF THIS DEVICE IS
 WIT
	NTDOAW:	MOVE	T1,DEVAIO(F)	;NOW SEE IF THIS DEVICE IS
 REP 25/166	;09C5
	IFN FTPI,<
		MOVEI	T1,IR.DOL	;DEVICE OFFLINE PSI FLAG
		MOVSI	S,IOSZAP	;ZAPPED DDB BIT
		MOVEI	T4,ASSCON!ASSPRG ;ASSIGNED BITS
		TDNN	S,DEVIOS(F)	;IS DDB ZAPPED ALREADY?
		TDNN	T4,DEVMOD(F)	;NO, IS IT ASSIGNED?
					;NOT ASSIGNED OR ZAPPED, USE OLD CRITERION
		CAIN	T2,LAT.CC	;ARE WE IN CONNECT CONFIRM WAIT?
		PUSHJ	P,PSIDVB##	;YES, ISSUE DEVICE OFFLINE
	>
		PUSHJ	P,NETWAK	;WAKE OUT OF HIBER, AT LEAST
		JRST	NTDNW7		;CONTINUE WITH COMMON CODE
	;
	; HERE SEND DISCONNECT CONFIRM
	;
	NTDDS1:	PUSH	P,T4		;SAVE THE LAT ADDRESS
		MOVEI	T1,RSN.OK	;NORMAL RETURN "REASON"
 WIT
	IFN FTPI,<MOVEI	T1,IR.DOL>	;DEVICE OFFLINE PSI FLAG
		JRST	NTDNW2		;CONTINUE WITH COMMON CODE


	; HERE SEND DISCONNECT CONFIRM

	NTDDS1:	MOVEI	T1,RSN.OK	;NORMAL RETURN "REASON"
 REP 45/166	;09C6
		POP	P,T4		;GET THE LAT ADDRESS BACK
 WIT
	IFN FTPI,<MOVEI T1,IR.IER!IR.OER!IR.DOL>  ;PSI FLAGS FOR UNEXPECTED DISCONNECT
		MOVEI	T2,IONDD%	;REMOTE NETWORK DEVICE DISCONNECTED
 REP 17/170	;09C7
		MOVEI	T1,760000	;ALL ERROR BITS
		IORM	T1,DEVIOS(F)	;LIGHT THEM FOR DOWN DEVICE

	NTDNW1:				;HERE TO DISCONNECT A DDB
		MOVE	T1,DEVMOD(F)	;GET DEVICE ACTIVITY FLAGS
		TRNN	T1,ASSCON!ASSPRG;DEVICE IN USE BY A JOB?
		JRST	NTDNW7		;NO, IDLE DEVICE (DDP), NO PSI/ETC.
		LDB	T1,NETSLA##	;GET THE LAT ADDRESS, AND FROM THAT
		LDB	T2,LATSTA##	; GET THE CONNECTION STATE
		CAIE	T2,LAT.OK	;IS THE LINK RUNNING "OK"?
		JRST	[PUSHJ	P,NETWAK; IF NOT, (IE IN CONNECT/DISCONNECT WAIT)
			 JRST NTDNW7]	; JUST WAKE THE JOB THE EASY WAY

	IFN FTPI,<
		PUSHJ	P,PSIDWN##	;GIVE THE DEVICE OFFLINE INTERRUPT
	>
 WIT
		MOVEI	T1,IOERR!IODEND	;ALL ERROR BITS
		IORM	T1,DEVIOS(F)	;LIGHT THEM FOR DOWN DEVICE
	IFN FTPI,<MOVEI T1,IR.IER!IR.OER!IR.DOL>  ;NODE DOWN PSI FLAGS
		MOVEI	T2,IONND%	;NODE DOWN (OR PATH LOST) ERROR CODE

	;ENTER HERE TO DISCONNECT THE DDB,
	;  T1 CONTAINING PSI REASON FLAGS, T2 CONTAINING EXTENDED ERROR CODE

	NTDNW1:	DPB	T2,PDVESE##	;SET EXTENDED (DEVOP.) ERROR STATUS CODE
	NTDNW2:	LDB	T2,PJOBN	;GET OWNING JOB (IF ANY)
		JUMPE	T2,NTDNW7	;NO PSI/NETWAK IF NO JOB
	IFN FTPI,<
		MOVE	T2,DEVMOD(F)	;GET DEVICE ACTIVITY FLAGS
		TRNE	T2,ASSCON!ASSPRG;DEVICE DEFINITELY IN USE BY A JOB?
		PUSHJ	P,PSIDVB##	;YES, GIVE THE DEVICE OFFLINE/ETC. INTERRUPT
	> ;END IFN FTPI
 REP 36/170	;09C8
		MOVEI	T1,NTDOAV	;THEN CHANGE OUR MIND
		PUSHJ	P,(T1)		;CALL ROUTINE TO WAKE JOB. (UNDERSTANDS DEPAIO)
 WIT
		MOVEI	T1,NTDOAW	;THEN CHANGE OUR MIND
		PUSHJ	P,(T1)		;CALL ROUTINE TO WAKE JOB. (UNDERSTANDS DEPAIO)
					;  NOTE THAT WE MUST CALL NETWAK EVEN IF
					;  ASSCON!ASSPRG IS OFF, SINCE A DEVICE IN
					;  CONNECT-CONFIRM WAIT HASN'T SET THESE BITS
					;  YET (DONE BY UUOCON, NOT NETSER)
 SUM 65226