Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99g-bb - filio.c12
There are no other files named filio.c12 in the archive.
 REP 25/28	;12C1
		SKIPL	UNI2ND##(P1)	;DON'T ALLOW EXCHANGE OF ALTERNATE PORT
		SKIPGE	UNI2ND##(U)	;...
 WIT
		MOVSI	T1,1		;BIT SET FOR ALTERNATE PORT
		TDNN	T1,UNI2ND##(P1)	;DON'T ALLOW EXCHANGE OF ALTERNATE PORT
		TDNE	T1,UNI2ND##(U)	;...
 REP 26/60	;12C2
		SKIPE	1(T1)		;YES, IS NEXT SLOT EMPTY?
 WIT
		HRRZ	T2,T1		;GET ADDRESS PORTION OF POINTER
		CAIE	T2,DEVRBN##(F)	;SKIP IF THIS IS THE LAST SLOT
		SKIPE	1(T1)		;IS NEXT SLOT EMPTY?
 REP 30/117	;12C3
	OUTGRP:	HRRZ	T1,UNISTR##(U)	;LOC OF STR DATA BLOCK
 WIT
	OUTGRP:	PUSHJ	P,SAVE1##	;FREE UP P1
		HRRZ	P1,U		;REMEMBER ORIGINAL UNIT IN CASE TAKCHK SWITCHES
					; TO A DIFFERENT UNIT
		HRRZ	T1,UNISTR##(U)	;LOC OF STR DATA BLOCK
 REP 35/118	;12C4
	OUTGR7:	PUSHJ	P,WRTPTR	;YES, REWRITE RIB WITH NEW PNTRS
		PUSHJ	P,DWNDA		;GIVE UP DA NOW THAT RIB WRITTEN
 WIT
	OUTGR7:	EXCH	P1,U		;GET BACK TO ORIGINAL UNIT IN CASE WRTPTR CALLS
					; RIBSAT (WHICH GIVES UP DA)
		PUSHJ	P,WRTPTR	;YES, REWRITE RIB WITH NEW PNTRS
		PUSHJ	P,DWNDA		;GIVE UP DA NOW THAT RIB WRITTEN
		EXCH	P1,U		;BACK TO CURRENT UNIT
 REP 18/119	;12C5
		PUSHJ	P,WRTPTR	;COPY PNTRS TO RIB, WRITE
 WIT
		EXCH	P1,U		;GET BACK TO ORIGINAL UNIT IN CASE WTRPTR CALLS
					; RIBSAT (WHICH GIVES UP DA)
		PUSHJ	P,WRTPTR	;COPY PNTRS TO RIB, WRITE
		EXCH	P1,U		;BACK TO NEW UNIT
 INS 38/119	;12C6
		EXCH	P1,U		;BACK TO ORIGINAL UNIT
		PUSHJ	P,DOWNIF	;GIVE UP DA IF SIM UPDATE
		EXCH	P1,U		;BACK TO CURRENT UNIT
 REP 24/154	;12C7
		SOS	T1,UNIHBN##(U)	;GET BLOCK BEFORE THE BAD ONE
 WIT
		MOVE	T1,UNIHBN##(U)	;GET BAD BLOCK
 REP 21/159	;12C8
	;SUBROUTINE TO COUNT THE NUMBER OF BLOCKS TRANSFERRED (INCLUDING THE BAD BLOCK)
	;RETURNS NUM OF BLOCKS IN T1
 WIT
	;ROUTINE TO RETURN BAD BLOCK NUMBER RELATIVE TO BEGINNING
	;OF TRANSFER.  RETURNS RELATIVE BLOCK NUMBER IN T1.
 REP 26/159	;12C9
		TRNE	P2,IOECCX	;ECC CORRECTABLE ERROR?
		ADDI	T1,BLKSIZ##-2	;YES, MAKE SURE "BAD" BLOCK IS COUNTED

		LSH	T1,MBKLSH##	;CONVERT TO # OF GOOD BLOCKS
 WIT
		TRNE	P2,IODTER	;IS THIS EITHER
		TRNN	P2,IODERR!IOHDER ; FORMAT OR SEARCH ERROR?
		SUBI	T1,1		;NO, ENSURE WE GET THE RIGHT NUMBER OF BLOCKS
					;(DEVBLK(F) + THIS NUMBER = BAD BLOCK NUMBER)
		LSH	T1,MBKLSH##	;CONVERT TO RELATIVE BLOCK NUMBER
 REP 25/161	;12C10
		PUSHJ	P,CTGOOD	;GET NUM OF BLOCKS XFERRED (INCLUDING BAD)
		SOSGE	T1		;NUM GOOD BLOCKS
		SETZ	T1,		;CHANNEL BLEW IT, ASSUME WORST CASE:
					;I.E. ALL BLOCKS BAD
 WIT
		PUSHJ	P,CTGOOD	;GET RELATIVE BAD BLOCK NUMBER
		AOS	T1		;CONVERT BAD BLOCK NUMBER RELATIVE TO BEGINNING
					; OF TRANSFER TO NUMBER OF BLOCKS XFERRED
 REP 24/164	;12C11
	POSDN5:	PUSHJ	P,CTGOOD	;RESET CHNNUM TO NO OF GOOD BLOCKS
		SKIPE	UNIERR##(U)	;IS THIS BEFORE FIRST RECAL?
 WIT
	POSDN5:	SKIPE	UNIERR##(U)	;IS THIS BEFORE FIRST RECAL?
 SUM 46613