Google
 

Trailing-Edge - PDP-10 Archives - bb-y390o-bm_tops20_v41_atpch_20 - autopatch/mountr.c08
There are no other files named mountr.c08 in the archive.
 REP 34/1	;08C1
		VEDIT==161		;EDIT #
 WIT
		VEDIT==164		;EDIT #
 INS 2/2	;08C2
	;164   If MOUNTR detects that VOLUME-ID is numeric, make it increment the
	;      volume i.d.s of the other tapes in a SET TAPE FOO: INITIALIZE
	;      command in those cases where the COUNT value is greater than one.
	;      GCO 4.2.1577
	;163   Do not crash if SYSTEM:INFO is not running when sending an IPCF message.
	;      Instead, inform the operator, sleep for 30 seconds and then attempt
	;      to send another message.
	;      GCO 4.2.1575
	;162   Set the controller type field to zero in the usage records. Also set
	;      the access type field to 1.
	;      GCO 4.2.1569
 INS 15/29	;08C3
	;[163]At APMRC:+1L add 11 lines   JCR   5/1/84
	; Table of error codes and corresponding processing addresses upon MSEND
	; failure for IPCF Send and Receive routines

	MTBL:	IPCFX4,,TRAN1		;[163]Receiver's PID is invalid
		IPCFX5,,TRAN1		;[163]Receiver's PID is disabled
		IPCFX6,,TRAN6		;[163]Send quota is exceeded
		IPCFX7,,TRAN5		;[163]Receiver's quota is exceeded
		IPCFX8,,TRAN6		;[163]IPCF free space is exhausted
		IPCF19,,TRAN7		;[163]No PID for SYSTEM INFO
		MONX06,,TRAN6		;[163]No swappable free space
	MLEN==.-MTBL			;[163]Length of the table
 REP 53/37	;08C4
		SETONE ACCKT		;SET CONTROLLER TO ALL ONES
 WIT
	;**;[162]AT ACCS2:+30L CHANGE ONE LINE  JCR  2/29/84
		SETZRO ACCKT		;[162]SET CONTROLLER TO ALL ONES
 INS 29/39	;08C5
	;**;[162]AT ACCMTD:+1L ADD ONE LINE  2/29/84  JCR
		SETZM UMTKTP		;[162]SET CONTROLLER TYPE TO ZERO
 INS 40/42	;08C6
	;**;[162]AT STOSTR:+14L ADD TWO LINE  2/29/84  JCR
		MOVEI T1,1		;[162]GET ACCESS TYPE
		MOVEM T1,USTATP         ;[162]SAVE IT
 REP 42/62	;08C7

	TRAN3:	CAIN T1,IPCFX4
		JRST TRAN1		;RECEIVER'S PID IS INVALID
		CAIN T1,IPCFX5
		JRST TRAN1		;THE JERK DISABLED HIS PID
		CAIN T1,IPCFX6
		JRST TRAN4		;SEND QUOTA EXCEEDED
		CAIN T1,IPCFX7
		JRST TRAN5		;RECEIVE QUOTA EXCEEDED
		CAIN T1,IPCFX8
		JRST TRAN4		;IPCF FREE SPACE EXHAUSTED
		CAIN T1,MONX06
		JRST TRAN4		;NO SWAPPABLE FREE SPACE
		CALL STOP		;I CAN'T HANDLE THIS ERROR

	TRAN5:	SOJL Q1,TRAN1		;GIVE UP IF RETRY COUNT EXHAUSTED
	TRAN4:	MOVEI T1,^D1000		;RETRYABLE FAILURE
		DISMS			;DELAY
		JRST TRAN2		;TRY IT AGAIN
 WIT
	;[163]At TRAN3:+0L replace 13 lines with 6 lines   JCR  5/1/84
	TRAN3:	MOVSI T2,-MLEN		;[163]Get the length of the error table
	TRAN4:	HLRZ T4,MTBL(T2)	;[163]Get the next error code
		CAMN T1,T4		;[163]Match the error returned by MSEND?
		JRST @MTBL(T2)		;[163]Yes, process the error
		AOBJN T2,TRAN4		;[163]No, get the next error code
		CALL STOP		;[163]This error can't be dealt with
	TRAN5:	SOJL Q1,TRAN1		;GIVE UP IF RETRY COUNT EXHAUSTED
	;[163]At TRAN5:+1L change 1 line   JCR   5/1/84
	TRAN6:	MOVEI T1,^D1000		;RETRYABLE FAILURE
		DISMS			;DELAY
		JRST TRAN2		;TRY IT AGAIN
	;[163]AT TRAN:+4L Add 5 lines      JCR   5/1/84
	TRAN7:	HRROI T1,[ASCIZ/SYSTEM INFO Is Not Running - MOUNTR Dismissing For 30 Seconds
	/]				;[163]The message to the operator
		PSOUT			;[163]Tell the operator
		MOVEI T1,^D30000	;[163]Give the operator time to restart INFO
		DISMS			;[163]Sleep for 30 seconds
		JRST TRAN2		;[163]Try again
 INS 50/77	;08C8
	;**;[164]At KGTVOL:+1L add 1 line
		STKVAR<TMPSIX>		;[164]Later, to hold sixbit vol. i.d. value
 INS 64/77	;08C9
	;**;[164]At KGTVOL:+16L add 19 lines  JCR  5/8/84
		MOVEM T1,TMPSIX		;[164]Save for later use
		MOVE T1,Q1		;[164]Address of vol. i.d. in ASCIZ
		CALL ASCIZL		;[164](T2) = number characters in vol. i.d.
		MOVE T1,Q1		;[164]Make T1 into a pointer to the volume
		HRLI T1,(POINT 7)	;[164]i.d. in ASCIZ
		SETZM T4		;[164]T4 will contain the integer value
	CHKNXT: ILDB T3,T1		;[164]Next volume i.d. character
		CAIL T3,"0"		;[164]Less than zero in value?
		CAILE T3,"9"		;[164]No, less or equal to nine?
		JRST [ SETOM RSBIVN(RSB)	;[164]No, not a numeric i.d.
		       MOVE T1,TMPSIX		;[164]Get the sixbit i.d. value
		       RETSKP ]			;[164]And return
		SUBI T3,"0"		;[164]Change from ASCII to binary
		ADD T4,T3		;[164]Add to the integer volume i.d.
		SOSLE T2		;[164]Don't multiply the units contribution
		IMULI T4,^D10		;[164]Multiply by base 10
		JUMPG T2,CHKNXT		;[164]Get the next character
		MOVEM T4,RSBIVN(RSB)	;[164]Store the integer value of the i.d.
	 	MOVE T1,TMPSIX		;[164]Restore the sixbit value of the i.d.
 REP 12/86	;08C10

 WIT
	;**;At KVIRSB:+2L add 11 lines  JCR   5/8/84
		MOVE T1,RSBIVN(RSB)	;[164]Get the integer volume i.d.
		JUMPL T1,KVIR2		;[164]Don't increment if not an integer
		CALL INT26		;[164]convert to sixbit
		MOVEM T1,RSBIVL(RSB)	;[164]set sixbit volid too
		MOVEI T1,.SIINC		;[164]code for numeric volid increment
		SETZ T2,		;[164]no limit
		MOVEI T3,1		;[164]default = 1
		CALL KGBLK		;[164]lookup increment
		 JRST KVIBM		;[164]error
		MOVEM T1,RSBIVI(RSB)	;[164]store increment
	KVIR2:				;[164]
 REP 40/86	;08C11

		MOVEI T1,.SISVI		;CODE FOR STARTING NUMERIC VOLID
		CALL ORNBLF		;LOOKUP VOLID
		 SETZ T2,		;NOT THERE
		JUMPE T2,KVIR2		;STARTING VOLID SPECIFIED?
		MOVE T1,(T1)		;YES, GET IT
		MOVEM T1,RSBIVN(RSB)	;STORE IT
		CALL INT26		;CONVERT TO SIXBIT
		MOVEM T1,RSBIVL(RSB)	;SET SIXBIT VOLID TOO

		MOVEI T1,.SIINC		;CODE FOR NUMERIC VOLID INCREMENT
		SETZ T2,		;NO LIMIT
		MOVEI T3,1		;DEFAULT = 1
		CALL KGBLK		;LOOKUP INCREMENT
		 JRST KVIBM		;ERROR
		MOVEM T1,RSBIVI(RSB)	;STORE INCREMENT
	KVIR2:
 WIT
	;**;[164]At KVIRSB:+31L delete 14 lines   JCR  5/8/84
 REP 47/191	;08C12
		MOVE T1,[SIXBIT/000000/] ;INIT RESULT
 WIT
	;**;[164]At INT26:+2L change 1 line  JCR  5/8/84
		MOVE T1,[EXP 0]		;[164]INIT RESULT
 SUM 147239