Google
 

Trailing-Edge - PDP-10 Archives - klad_sources - klad.sources/uuoerr.ksm
There are no other files named uuoerr.ksm in the archive.
SUBTTL	*UUOERR* OLD-UUO ERROR HANDLER SUBROUTINE, MARCH 1978

;THIS SUBROUTINE PROVIDES ERROR REPORTING THRU THE USE OF UUO'S.

ERRMES:	MOVEM	0,%ERAC0#	;SAVE AC0
	MOVEM	1,%ERAC1#	;SAVE AC1
	MOVEM	2,%ERAC2#	;SAVE AC2
	AOS	ERRTLS		;INCREMENT ERROR TOTALS
	HRRZ	0,$SVUPC	;GET PC OF UUO
	CAMN	0,ERRPC		;PC = PC OF LAST ERROR ?
	AOS	MICNT#		;YES, ADD 1 TO ERROR COUNT
	MOVE	0,MICNT
	HRL	0,$SVUPC
	SETZM	PROCED#		;CLEAR PROCEED FLAG
	SWITCH
	TLNE	NOPNT		;PRINTOUT ?
	JRST	%ERRS1		;NO, RESTORE AC'S AND RETURN
	MOVE	1,$SVUUO
	LSH	1,-^D27
	MOVEM	1,%ACS1A#	;SAVE UUO NUMBER
	MOVE	0,%ERAC0
	MOVE	1,%ERAC1
	SKIPGE	@ERRLOP		;ERR LOOP AC > OR = 0 ?
	JRST	%ERRS4		;NO, SEE IF PRINT ALL
%ERMS1:	SETZM	MICNT		;CLEAR ERROR COUNT
	SKIPL	MONCTL		;DIAG MON OR SYS EXER ?
	JRST	.+4		;NO, DON'T NEED TITLE
	SKIPN	%ERFST#		;FIRST ERROR ?
	PNTNM			;YES, PRINT PROGRAM TITLE
	SETOM	%ERFST
	SKIPN	PASCNT		;FIRST PASS ?
	JRST	.+4		;YES
	PMSG	<^TEST PASS COUNT = >
	MOVE	PASCNT
	PNTDEC
	PMSG	<^PC =   >
	HRRZ	0,$SVUPC	;GET PC OF UUO
	MOVEM	0,ERRPC		;SAVE FOR COMPARE
	PNT6			;PRINT UUO ADDRESS
	XLIST
	IFDEF	ERDIAG,<LIST
;DIAGNOSTIC FORMAT ERROR PRINTER

;PRINT RESULT

%ERMS2:	PMSG	<^RESULT  = >
	MOVE	1,$SVUUO	;GET AC # OF UUO
	LSH	1,-27
	ANDI	1,17
	MOVE	0,(1)		;GET C(AC)
	CAIG	1,1		;IS AC # = TO SAVE AC ?
	MOVE	0,%ERAC0(1)	;YES, GET SAVED AC
	PNTHW			;PRINT C(AC)

	MOVE	CONSW
	TLNE	TXTINH		;PRINT FAILURE DES AND FLT NBR ?
	JRST	%ERMORE		;NO, RESTORE AC'S ETC.

;PRINT FAILURE DESCRIPTOR

	MOVE	1,%ACS1A	;GET UUO NUMBER
	CAIG	1,1		;PRINT DESCRIPTOR ?
	JRST	%ERMS3		;NO, JUST PRINT FAULT NUMBER
	PCRL
	MOVE	%FLTTB(1)
	PNTAL			;PRINT FAULT DESCRIPTOR

;PRINT FAULT NUMBER

%ERMS3:	PMSG	<^FAULT NUMBER = >
	MOVEI	TLET
	PNTA			;PRINT TEST LETTER
	HRRZ	$SVUUO
	TRNE	700000
	JRST	%ER6X
	TRNE	070000
	JRST	%ER5X
	TRNE	007000
	JRST	%ER4X
	PNT3			;PRINT FAULT NUMBER
%ER7X:	PCRL
	JRST	%ERMORE

%ER4X:	PNT4
	JRST	%ER7X
%ER5X:	PNT5
	JRST	%ER7X
%ER6X:	PNT6
	JRST	%ER7X

;FAILURE DESCRIPTORS

TLET:	0			;TEST LETTER
%FLTTB:	0			;DESCRIPTOR TABLE
%NODES:	[0]			;NO DESCRIPTOR
SPDES:	[0]			;SPECIAL USER FAILURE DESCRIPTOR
$ACF:	[ASCIZ/C(AC) FAILED/]
%AC1F:	[ASCIZ/C(AC+1) FAILED/]
%EF:	[ASCIZ/C(E) FAILED/]
%E1F:	[ASCIZ/C(E+1) FAILED/]
%ARF:	[ASCIZ/C(C(ACR)) FAILED/]
%AR1F:	[ASCIZ/C(C(ACR+1)) FAILED/]
%ALF:	[ASCIZ/C(C(ACL)) FAILED/]
%EEF:	[ASCIZ/C(C(E)) FAILED/]
%FF:	[ASCIZ/FLAG FAILED/]
>
	XLIST
	IFDEF	ERRELB,<
	LIST
;RELIABILITY FORMAT ERROR PRINTER

%ERMS2:	SETZM	%RAND#		;CLEAR PNT C(RAN) FLAG
	MOVE	1,%ACS1A
	CAIL	1,11		;UUO # 11-13
	SETOM	%RAND		;YES, SET PNT C(RAN) FLAG
	TRZ	1,10		;MAKE UUO # 1-7
	MOVEM	1,%ACS1A
	MOVE	2,ERRPC		;GET UUO ADDRESS
	MOVE	2,-1(2)		;GET INST IN UUO-1
	CAIL	1,4		;UUO # < THAN 4 ?
	MOVE	2,$SVUUO	;YES, GET UUO
	MOVEM	2,%CNTE#	;SAVE E ADDRESS
	MOVE	2,%ERAC2
	MOVE	1,%ERAC1
	MOVE	0,%ERAC0
	MOVEI	1,@%CNTE	;GET ADRS FIELD OF UUO OR UUO-1
	MOVEM	1,%EE1#
	MOVE	1,%ERAC1
	MOVE	1,@%EE1		;GET C(E)
	MOVEM	1,%EE1A#
	MOVE	1,%ERAC1
	MOVEI	1,@$SVUUO	;GET ADDRESS FIELD OF UUO
	MOVEM	1,%EE2#
	MOVE	1,%ACS1A
	CAIN	1,3		;UUO # 3 ?
	JRST	.+4		;YES
	MOVE	1,%ERAC1
	MOVE	1,@%EE2		;GET C(E) OF UUO
	MOVEM	1,%EE2A#
	MOVE	2,%ACS1A	;GET UUO #
	MOVE	1,%CNTE
	LSH	1,-27		;GET AC NUMBER
	ANDI	1,17
	CAIG	2,5		;UUO # 6,7 OR 2
	CAIN	2,2
	JRST	%ERR2		;YES, GO PNT E AND C(E)
;PRINT ERROR AC

	PMSG	<^AC =   >
	MOVE	0,1
	PNT2			;PRINT AC NUMBER
	PMSG	<^C(AC)= >
	MOVE	0,(1)		;GET C(AC)
	CAIG	1,2		;IS AC # = SAVED AC ?
	MOVE	0,%ERAC0(1)	;YES, GET SAVED AC
%ERRB:	PNTHW			;PRINT C(AC) OR UUO2 (E)

;PRINT ERROR INFO

	CAIN	2,5		;UUO # 5
	JRST	%ERR4		;YES, GO PNT 'TST','SKP', OR ETC.

	PMSG	<^COR =  >
	MOVE	0,(1)		;GET C(AC)
	CAIG	1,2		;IS AC # = SAVED AC ?
	MOVE	0,%ERAC0(1)	;YES, GET SAVED AC
	CAIE	2,2
	MOVE	0,%EE1A		;UUO # 2, GET C(E)
	PNTHW			;PRINT C(E) OR UUO2 C(AC)
	CAIL	2,4		;UUO # >3 ?
	JRST	%ERRC		;YES, RESTORE AC'S AND RETURN

	PMSG	<^    ORIGINAL>
%ERRB1:	MOVE	1,$SVUUO
	LSH	1,-27		;GET AC # OF UUO
	ANDI	1,17
	PMSG	<^C(AC)= >
	MOVE	0,(1)		;GET C(AC)
	CAIG	1,2		;IS AC # = SAVED AC ?
	MOVE	0,%ERAC0(1)	;YES, GET SAVED AC
	SKIPE	%RAND		;PRINT C(RAN) FLAG SET ?
	MOVE	0,RAN#		;YES
	PNTHW			;PRINT C(AC) OR C(RAN)
	CAIN	2,3		;UUO # 3 ?
	JRST	%ERR2		;YES, PRINT E, RESTORE AC'S AND RETURN
	CAIN	2,7		;UUO # 7 ?
	JRST	%ERRC		;YES, BYPASS PRINTING C(E)
	PMSG	<^C(E) = >
	MOVE	0,%EE2A
	PNTHW			;PRINT C(E)
	JRST	%ERRC

%ERR2:	PMSG	<^E =    >
	MOVE	0,%EE2
	CAIN	2,2		;UUO # 2 ?
	MOVE	0,%EE1
	PNT6			;PRINT E OF UUO OR UUO-1
	CAIL	2,6		;UUO 6 OR 7 ?
	JRST	%ERRB1		;YES, GO PNT C(AC), C(E) AND RETURN
	CAIN	2,3		;UUO # 3 ?
	JRST	%ERRC		;YES, RESTORE AC'S AND RETURN

	PMSG	<^C(E) = >
	MOVE	0,%EE1A		;GET C(E)
	JRST	%ERRB
;PRINT ASCII COMMENT

%ERR4:	HRRZI	0,@$SVUUO
	PNTA			;PRINT 'TST','SKP', OR ETC.
	JRST	%ERRC

;COMPLETE PRINTOUT

%ERRC:	PCRL

	XLIST
	IFDEF	UUOTXT,<
	LIST
	MOVE	0,CONSW
	TLNN	TXTINH		;PRINT DIAGNOSTIC COMMENT ?
	CAIE	2,7		;UUO # 7 ?
	JRST	%ERMORE		;NO, RESTORE AC'S AND RETURN
	MOVE	0,%EE2		;YES
	PNTAL			;PRINT DIAGNOSTIC COMMENT
	PCRL
>
	LIST
	JRST	%ERMORE

>
	LIST
;RESTORE AC'S AND RETURN OR HALT

%ERMORE:XCT	ERMORE
	SWITCH

%ERRS1:	TTALTM			;ALTMODE CHECK
	JRST	.+4		;NONE
	MOVEI	.+3		;SAVE CONT ADDRESS
	MOVEM	JOBOPC
	JRST	@ALTMGO		;PERFORM TRANSFER
	MOVE	CONSW
	TLNE	0,ERSTOP	;HALT ON ERROR SWITCH SET ?
	ERRHLT			;YES
	TLNN	0,LOOPER	;LOOP ON ERROR SWITCH SET ?
	SETOM	PROCED		;NO, SET THE PROCEED FLAG
	TLNE	0,DING		;RING BELL SWITCH SET ?
	PBELL			;YES, GO RING BELL

%ERRS2:	MOVE	2,%ERAC2	;RESTORE AC'S
	MOVE	1,%ERAC1
	SETOM	@ERRLOP		;SET C(ERR LOOP AC) TO -1
	SKIPN	PROCED		;LOOP ON ERROR ?
	JRST	%ERRS5		;YES
	AOS	@ERRLOP		;NO, INC C(ERR LOOP AC)
	AOS	@ERRLOP		;SO IT ='S 1
	SKIPL	MONCTL		;UNDER DIAGNOSTIC MONITOR ?
	JRST	%ERRS5		;NO, CONTINUE PROGRAM
	MOVE	0,ERRTLS	;YES
	CAIL	0,^D20		;PRINTED ALLOWED ERRORS ?
	JRST	%ERRS6

%ERRS5:	MOVE	0,%ERAC0	;NO, CONTINUE PROGRAM
	JRST	UUOEXT

%ERRS4:	MOVE	0,CONSW
	TLNN	PALERS		;PRINT ALL ERRORS ?
	JRST	%ERRS1		;NO
	JRST	%ERMS1		;YES

%ERRS6:	PMSGF	<^EXCEEDED ALLOWED ERRORS^>
	JRST	$BEND2