Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_SRC_1_19910112 - 7/galaxy-sources/oprerr.mac
There are 26 other files named oprerr.mac in the archive. Click here to see a list.
	TITLE	OPRERR	ORION MODULE FOR BUILDING ORION ERROR CODES
	SUBTTL	Preliminaries

;	COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1975, 1988.
;	ALL RIGHTS RESERVED.
;
;	THIS SOFTWARE IS FURNISHED UNDER A  LICENSE AND MAY BE USED AND  COPIED
;	ONLY IN  ACCORDANCE  WITH  THE  TERMS OF  SUCH  LICENSE  AND  WITH  THE
;	INCLUSION OF THE ABOVE  COPYRIGHT NOTICE.  THIS  SOFTWARE OR ANY  OTHER
;	COPIES THEREOF MAY NOT BE PROVIDED  OR OTHERWISE MADE AVAILABLE TO  ANY
;	OTHER PERSON.  NO  TITLE TO  AND OWNERSHIP  OF THE  SOFTWARE IS  HEREBY
;	TRANSFERRED.
;
;	THE INFORMATION IN THIS  SOFTWARE IS SUBJECT  TO CHANGE WITHOUT  NOTICE
;	AND SHOULD  NOT  BE CONSTRUED  AS  A COMMITMENT  BY  DIGITAL  EQUIPMENT
;	CORPORATION.
;
;	DIGITAL ASSUMES NO  RESPONSIBILITY FOR  THE USE OR  RELIABILITY OF  ITS
;	SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY DIGITAL.

	SEARCH	GLXMAC,ORNMAC,QSRMAC
	PROLOG(OPRERR)

;Version numbers

	ERRMAN==:0			;Maintenance edit number
	ERRDEV==:16			;Development edit number
	VERSIN (ERR)			;Generate edit number

	COMMENT \
	THIS MODULE WILL BUILD THE ERROR CODE TABLES FOR ORION
	WHICH CONSIST OF TWO PARTS

		1.	ASCIZ MESSAGES
		2.	ITEXT MESSAGES
		3.	ITEXT MESSAGES FOR ACKS
\

	EXTERNAL	JOBTXT
	EXTERNAL	G$ARG1
	EXTERNAL	G$ARG2
	EXTERNAL	G$ARG3
	EXTERNAL	G$SID
	EXTERNAL	G$JOB	
	EXTERNAL	LOGFD
SUBTTL	Revision history

COMMENT \

3			1-Mar-79
	Add ORNMSG for Acknowledgements which were not errors.

*****  Release 4.2 -- begin maintenance edits  *****

*****  Release 5.0 -- begin development edits  *****

5	5.1003		4-Jan-82
	Move to new development area.  Add version vector.  Clean up
edit organization.

*****  Release 5 -- begin maintenance edits  *****

10	Increment maintenance edit level for GALAXY 5.

*****	Release 6.0 -- begin development edits	*****

15	6.1037		26-Oct-87
	Move sources from G5: to G6:

16	6.1225		8-Mar-88
	Update copyright notice.

\   ;End of Revision History
SUBTTL	Tables for Error Codes Reported

	EXTERNAL G$ERR			;DEFINED EXTERNAL

DEFINE	X(SUFFIX,TEXT),<
E$'SUFFIX:: PUSHJ P,RPTERR		;DISPATCH TO ERROR HANDLER
>  ;END OF DEFINE X

ERRTBL:: ERRCDS				;EXPAND THE DISPATCH TABLE
DEFINE	X(SUFFIX,TEXT),<
E$'SUFFIX:: PUSHJ P,RPTERR		;DISPATCH TO ERROR HANDLER
>  ;END OF DEFINE X
ERRTEX:	ERRTXT				;EXPAND TEXT MACROS
RSPMSG:	ORNMSG				;GOOD ACKS
	TXTERR==ERRTEX-ERRTBL+1		;GET NUMBER OF FIRST TEXT ERROR
	GOODMS=:RSPMSG-ERRTBL+1		;START OF GOOD MESSAGES



DEFINE	X(SUFFIX,TEXT),<
	EXP	[ASCIZ\TEXT\]		;TABLE OF MESSAGES
>  ;END OF DEFINE X



TXTTBL:: EXP	[BYTE (7)0]		;0 IS NOT REALLY AN ERROR
	ERRCDS				;DEFINE THE REST OF THEM
DEFINE	X(SUFFIX,TEXT),<
	EXP	[ITEXT(<TEXT>)]		;TABLE OF MESSAGES
>  ;END OF DEFINE X
TXTTEX:	ERRTXT
GOODTX:	ORNMSG				;DEFINE GOOD MESSAGES

DEFINE	X(SUFFIX,TEXT),<
	MF.FAT!INSVL.(<SIXBIT\   SUFFIX\>,MF.SUF)
>  ;END OF DEFINE X

STSTBL:: MF.NOM				;0 HAS NO TEXT ASSOCIATED
	ERRCDS				;EXPAND THE REST NOW
	ERRTXT				;EXPAND TEXT ERRORS

DEFINE	X(SUFFIX,TEXT),<
	INSVL.(<SIXBIT\   SUFFIX\>,MF.SUF)
>;END X
	ORNMSG				;EXPAND GOOD ACKS

;HERE WHEN SOMEONE CALLS (OR EXITS THROUGH) ANY OF THE E$xxx ERROR CODES
;	OR T$XXX ERROR CODES
;	THIS STORES THE RELATIVE ERROR NUMBER INTO G$ERR

RPTERR:: EXCH	T1,(P)			;SAVE T1, GET ERROR DISPATCH
	TLZ	T1,-1			;CLEAR THE LEFT HALF
	SUBI	T1,ERRTBL		;CONVERT TO ERROR INDEX
	CAIL	T1,TXTERR		;CHECK FOR TEXT ERROR
	TLO	T1,400000		;FLAG AS TXTERR
	SKIPN	G$ERR			;DON'T SAVE THIS IF ALREADY AN ERROR
	MOVEM	T1,G$ERR		;SET GLOBAL ERROR INDICATOR
	POP	P,T1			;RESTORE T1 AND RETURN
	$RETF				;PROPAGATE ERROR TO TOP LEVEL

	END				;END OF OPRERR