Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99g-bb - plrtap.c12
There are no other files named plrtap.c12 in the archive.
 REP 32/19	;12C1
		MOVEI	TF,PS.RDO!PS.RDH	;Device off-line or hung?
		TDZN	TF,TCB.PI(B)		;Is that what happened?
		$RETF				;Must be a real I/O error
		MOVEI	TF,PS.RDH		;Get hung device bit
		TDNE	TF,TCB.PI(B)		;Was it a hung device?
		JRST	TAPHNG			;Complain about hung device
		MOVX	S1,TS.NTP		;Get no tape present bit
		IORM	S1,TCB.ST(B)		;Set it so we know the disk isn't there
		PUSHJ	P,O$STAT##		;Tell the operator
		MOVX	S1,TS.INI		;Get the initialization bit
		TDNE	S1,TCB.ST(B)		;Doing that?
		JRST	TAPINI			;Yes
		JRST	TAPKIL			;Kill off the TCB

 WIT
		MOVEI	TF,0			;CLEAR AC
		EXCH	TF,TCB.PI(B)		;GET INTERRUPT BITS AND CLEAR
		TRNN	TF,PS.RDO!PS.RDH	;OFF-LINE OR HUNG?
		$RETF				;MUST BE A REAL I/O ERROR
		TRNE	TF,PS.RDH		;HUNG DEVICE?
		JRST	TAPHNG			;YES
		TRNE	TF,PS.RDO		;OFF-LINE?
		JRST	TAPOFL			;YES
		$RETF				;SHOULDN'T GET HERE

	TAPOFL:	MOVX	S1,TS.NTP		;GET NO TAPE PRESENT BIT
		IORM	S1,TCB.ST(B)		;SET FOR OPR NOTIFY
		PUSHJ	P,O$STAT##		;TELL THE OPERATOR
		MOVX	S1,TS.INI		;GET THE INITIALIZATION BIT
		TDNE	S1,TCB.ST(B)		;DOING THAT?
		JRST	TAPINI			;WAIT FOR DRIVE TO COME ONLINE
		MOVE	S1,TCB.DV(B)		;GET DEVICE NAME
		PUSHJ	P,T$CKAV		;SEE IF IN USE
		JUMPT	TAPKIL			;NO--KILL OFF THE TCB
		PUSH	P,TCB.FU(B)		;SAVE FILOP FUNCTION WORD
		PUSH	P,TCB.FI(B)		;AND I/O STATUS WORD
		PUSHJ	P,T$CLRS		;CLEAR ANY I/O ERRORS
		POP	P,TCB.FI(B)		;RESTORE
		POP	P,TCB.FU(B)		; ...
		JRST	TAPINI			;AND TRY AGAIN LATER
 SUM 249731