PRCER	MACRO M1110  22-AUG-78 01:49  PAGE 3





      1						.TITLE	PRCER

      2						.IDENT	/00/

      3

      4					;

      5					; COPYRIGHT   1974,  DIGITAL  EQUIPMENT  CORP.,  MAYNARD,   MASS.

      6					;

      7					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE

      8					; ON A  SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION

      9					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT

     10					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.

     11					;

     12					; THE  INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT

     13					; NOTICE AND  SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL

     14					; EQUIPMENT CORPORATION.

     15					;

     16					; DEC  ASSUMES NO  RESPONSIBILITY  FOR  THE  USE  OR RELIABILITY

     17					; OF ITS  SOFTWARE ON  EQUIPMENT WHICH  IS NOT SUPPLIED BY DEC.

     18					;

     19					; VERSION 00

     20					;

     21					; C. MONIA 18-APR-74

     22					;

     23					; ERROR MESSAGE PROCESSING

     24					;

     25					; LOCAL DATA

     26					;

     27

     28	000000					.PSECT	ETXT$D,D,GBL

     29

     30	000000	   124 	   113 	   102 	DIAG:	.ASCIZ	/TKB -- *DIAG*-/ ; DIAGNOSTIC PREFIX

	000003	   040 	   055 	   055

	000006	   040 	   052 	   104

	000011	   111 	   101 	   107

	000014	   052 	   055 	   000

     31	000017	   124 	   113 	   102 	FATAL:	.ASCIZ	/TKB -- *FATAL*-/ ; FATAL PREFIX

	000022	   040 	   055 	   055

	000025	   040 	   052 	   106

	000030	   101 	   124 	   101

	000033	   114 	   052 	   055

	000036	   000

     32

     33						.IF	DF	S$$MSG

     34

     35					SUFF:	.ASCIZ	/%2N/		; STANDARD SUFFIX

     36

     37						.ENDC

     38

     39

     40	000000					.PSECT

     41

     42					;+

     43					; **-$PRCER-PROCESS ERROR MESSAGE

     44					;

     45					; INPUTS:

     46					;

     47					;	R1=ERROR/SEVERITY

     48					;	R2=PARAMETER BLOCK ADDRESS

PRCER	MACRO M1110  22-AUG-78 01:49  PAGE 3-1





     49					;

     50					; OUTPUTS:

     51					;

     52					;	R0=ADDRESS OF OUTPUT BUFFER ($OUTBF)

     53					;	R1=ADDRESS OF BUFFER CONTAINING UNFORMATTED MESSAGE($TBUF)

     54					;	R2=PARAMETER BLOCK ADDRESS

     55					;	R3=SEVERITY CODE

     56					;

     57					;	THIS ROUTINE IS CALLED BY THE ERROR MESSAGE HANDLER ($ERMSG)

     58					; TO MOVE UNFORMATTED ERROR TEXT FROM THE CO-TREE TO THE ROOT FOR

     59					; SUBSEQUENT OUTPUT VIA LUN 2. THE MESSAGE TO BE FORMATTED CON-

     60					; TAINS AN APPROPRIATE PREFIX DEPENDANT ON THE SEVERITY CODE.

     61					;-

     62

     63	000000				$PRCER::			;

     64	000000	005003 				CLR	R3		; CLEAR SEVERITY

     65	000002	005004 				CLR	R4		; CLEAR ERROR NUMBER

     66	000004	150104 				BISB	R1,R4		; ISOLATE ERROR NUMBER

     67	000006	000301 				SWAB	R1		; POSITION SEVERITY TO LOW BYTE

     68	000010	150103 				BISB	R1,R3		; COPY SEVERITY CODE

     69	000012	020427 	000000G			CMP	R4,#E$RMAX	; LEGAL ERROR CODE

     70	000016	101003 				BHI	10$		; IF HI NO

     71	000020	020327 	000000G			CMP	R3,#S$V2	; LEGAL SEVERITY?

     72	000024	101413 				BLOS	20$		; IF LOS YES

     73	000026				10$:				;

     74	000026	012700 	000004G			MOV	#$ARGBK+4,R0	; GET ADDRESS IN ARGUMENT BLOCK

     75	000032	016610 	000012 			MOV	12(SP),(R0)	; SAVE ADDRESS OF CALLER

     76	000036	010240 				MOV	R2,-(R0)	; STORE ARGUMENT BLOCK ADDRESS

     77	000040	000301 				SWAB	R1		; REPOSITION ERROR/SEVERITY CODE

     78	000042	010140 				MOV	R1,-(R0)	; STORE SEVERITY CODE

     79	000044	010002 				MOV	R0,R2		; SET NEW PARAMETER BLOCK ADDRESS

     80	000046	012701 	000000C			MOV	#<S$V2*400!E$R5>,R1 ; GET NEW ERROR/SEVERITY

     81	000052	000752 				BR	$PRCER		; GO AGAIN

     82	000054				20$:				;

     83	000054	016705 	000000G			MOV	$CMIPT,R5	; GET COMMAND INPUT RECORD BLOCK

     84	000060	132765 	000004 	000017 		BITB	#FD.TTY,F.RCTL(R5) ; TTY DEVICE?

     85	000066	001001 				BNE	30$		; IF NE YES

     86	000070	005203 				INC	R3		; INCREMENT SEVERITY

     87	000072				30$:				;

     88	000072	012700 	000000'			MOV	#DIAG,R0	; ASSUME DIAGNOSTIC MESSAGE

     89	000076	020327 	000000G			CMP	R3,#S$V2	; DIAGNOSTIC?

     90	000102	103402 				BLO	40$		; IF LO YES

     91	000104	012700 	000017'			MOV	#FATAL,R0	; GET FATAL PREFIX

     92	000110				40$:				;

     93	000110	012701 	000000G			MOV	#$TBUF,R1	; SET INPUT BUFFER ADDRESS

     94	000114				50$:				;

     95	000114	112021 				MOVB	(R0)+,(R1)+	; MOVE PREFIX

     96	000116	001376 				BNE	50$		;

     97	000120	105741 				TSTB	-(R1)		; BACKUP TO LAST BYTE

     98

     99						.IF	DF	S$$MSG

    100

    101						CALL	CVDG		; CONVERT ERROR NUMBER TO ASCII

    102						MOVB	R5,(R1)+	; MOVE TO TEXT BUFFER

    103						SWAB	R5		; GET HIGH BYTE

    104						MOVB	R5,(R1)+	; MOVE TO TEXT BUFFER

    105						MOVB	#' ,(R1)+	; FORMAT WITH SPACES

PRCER	MACRO M1110  22-AUG-78 01:49  PAGE 3-2





    106						MOVB	#' ,(R1)+	;

    107

    108						.IFF

    109

    110	000122	012746 	000000G			MOV	#$LM1,-(SP)	; SET TO LOAD TEXT SET 1

    111	000126	020427 	000000G			CMP	R4,#M$SG1	; MESSAGE IN GROUP 1?

    112	000132	101402 				BLOS	55$		; IF LOS YES

    113	000134	012716 	000000G			MOV	#$LM2,(SP)	; REPLACE SUBROUTINE ADDRESS

    114	000140				55$:				;

    115	000140					CALL	@(SP)+		; LOAD TEXT

    116

    117						.ENDC

    118

    119	000142	006304 				ASL	R4		; CONVERT MESSAGE NUMBER TO WORD INDEX

    120	000144	016400 	000000G			MOV	$MSG(R4),R0	; GET POINTER TO UNFORMATTED STRING

    121	000150				60$:				;

    122	000150	112021 				MOVB	(R0)+,(R1)+	; MOVE MESSAGE PROPER

    123	000152	001376 				BNE	60$		;

    124

    125						.IF	DF	S$$MSG

    126

    127						TSTB	-(R1)		; BACKUP TEXT POINTER

    128						MOV	#SUFF,R0	; POINT TO SUFFIX STRING

    129					70$:				;

    130						MOVB	(R0)+,(R1)+	; INSERT SUFFIX

    131						BNE	70$		;

    132

    133						.ENDC

    134

    135	000154	012700 	000000G			MOV	#$OUTBF,R0	; SET ADDRESS OF OUTPUT BUFFER

    136	000160	012701 	000000G			MOV	#$TBUF,R1	; SET ADDRESS OF INPUT

    137	000164					RETURN			;

    138

    139

    140						.IF	DF	S$$MSG

    141

    142

    143					;

    144					; SUBROUTINE TO CONVERT ERROR NUMBER TO TWO-DIGIT ASCII

    145					;

    146

    147					CVDG:				;

    148						SAVVR			; SAVE VOLATILE REGISTERS

    149

    150						.IF	DF	V1145

    151

    152						MOV	R4,R1		; GET ERROR NUMBER

    153						CLR	R0		; CLEAR HIGH PART OF DIVIDEND

    154						DIV	#10.,R0		; DIVIDE BY TEN

    155

    156						.IFF

    157

    158						MOV	R4,R0		; GET ERROR NUMBER

    159						MOV	#10.,R1		; SET DIVISOR

    160						CALL	$DIV		; DIVIDE BY TEN

    161

    162						.ENDC

PRCER	MACRO M1110  22-AUG-78 01:49  PAGE 3-3





    163

    164						SWAB	R1		; POSITION REMAINDER

    165						BIS	R1,R0		; COMBINE WITH DIVIDEND

    166						BIS	#"00,R0		; INSERT ASCII OFFSET

    167						MOV	R0,R5		; SAVE RESULT

    168						RETURN

    169

    170						.ENDC

    171

    172		000001 				.END

PRCER	MACRO M1110  22-AUG-78 01:49  PAGE 3-4

SYMBOL TABLE



B.BBFS= 000010   	FD.INS= 000010   	F.BGBC= 000057   	F.RATT= 000001   	N.FVER= 000016

B.BFST= 000015   	FD.ISP= 002000   	F.BKDN= 000026   	F.RCNM= 000034   	N.NEXT= 000022

B.NXBD= 000012   	FD.MNT= 100000   	F.BKDS= 000020   	F.RCTL= 000017   	N.STAT= 000020

B.VBN = 000004   	FD.OSP= 004000   	F.BKEF= 000050   	F.RSIZ= 000002   	N.UNIT= 000034

CH.AND= 000001   	FD.PLC= 000004   	F.BKP1= 000051   	F.RTYP= 000000   	R$$11M= 000000

CR    = 000015   	FD.PRN= 000004   	F.BKST= 000024   	F.SEQN= 000100   	R.FIX = 000001

DIAG    000000R     002	FD.PSE= 010000   	F.BKVB= 000064   	F.SPDV= 000072   	R.SEQ = 000003

E$RMAX= ****** GX	FD.RAH= 000001   	F.CHR = 000075   	F.SPUN= 000074   	R.VAR = 000002

E$R5  = ****** GX	FD.RAN= 000002   	F.CNTG= 000034   	F.STBK= 000036   	SPA   = 000040

FATAL   000017R     002	FD.REC= 000001   	F.DFNB= 000046   	F.UNIT= 000136   	S$V2  = ****** GX

FA.APD= 000100   	FD.RWM= 000001   	F.DSPT= 000044   	F.URBD= 000020   	S.BFHD= 000020

FA.CRE= 000010   	FD.SDI= 000020   	F.DVNM= 000134   	F.VBN = 000064   	S.FATT= 000016

FA.DLK= 001000   	FD.SQD= 000040   	F.EFBK= 000010   	F.VBSZ= 000060   	S.FDB = 000140

FA.ENB= 100000   	FD.TTY= 000004   	F.EFN = 000050   	HT    = 000011   	S.FNAM= 000006

FA.EXC= 002000   	FD.WBH= 000002   	F.EOBB= 000032   	LF    = 000012   	S.FNB = 000036

FA.EXT= 000004   	FF    = 000014   	F.ERR = 000052   	M$SG1 = ****** GX	S.FNBW= 000017

FA.NSP= 000100   	FF.CHR= 000005   	F.FACC= 000043   	NB.DEV= 000200   	S.FNTY= 000004

FA.POS= 010000   	FF.NV = 000003   	F.FFBY= 000014   	NB.DIR= 000100   	S.FTYP= 000002

FA.RD = 000001   	FF.POE= 000002   	F.FNAM= 000110   	NB.NAM= 000004   	S.NFEN= 000020

FA.RWD= 004000   	FF.RWD= 000001   	F.FNB = 000102   	NB.SD1= 000400   	VT    = 000013

FA.SEQ= 040000   	FF.RWF= 000006   	F.FTYP= 000116   	NB.SD2= 001000   	$ARGBK= ****** GX

FA.SHR= 000040   	FF.SPC= 000004   	F.FVER= 000120   	NB.SNM= 000040   	$CMIPT= ****** GX

FA.TMP= 000020   	FO.APD= 000106   	F.HIBK= 000004   	NB.STP= 000020   	$LM1  = ****** GX

FA.WCK= 020000   	FO.MFY= 000002   	F.LUN = 000042   	NB.SVR= 000010   	$LM2  = ****** GX

FA.WRT= 000002   	FO.RD = 000001   	F.MBCT= 000054   	NB.TYP= 000002   	$MSG  = ****** GX

FD.BLK= 000010   	FO.UPD= 000006   	F.MBC1= 000055   	NB.VER= 000001   	$OUTBF= ****** GX

FD.CCL= 000002   	FO.WRT= 000016   	F.MBFG= 000056   	N.DID = 000024   	$PRCER  000000RG

FD.COM= 020000   	F.ACTL= 000076   	F.NRBD= 000024   	N.DVNM= 000032   	$TBUF = ****** GX

FD.CR = 000002   	F.ALOC= 000040   	F.NREC= 000030   	N.FID = 000000   	$$    = 000001

FD.DIR= 000010   	F.BBFS= 000062   	F.OVBS= 000030   	N.FNAM= 000006   	...GBL= 000000

FD.FTN= 000001   	F.BDB = 000070   	F.RACC= 000016   	N.FTYP= 000014   	...TPC= 000140

FD.F11= 040000



. ABS.	000000	   000

      	000166	   001

ETXT$D	000037	   002

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  2239 WORDS  ( 9 PAGES)

DYNAMIC MEMORY:  2772 WORDS  ( 10 PAGES)

ELAPSED TIME:  00:00:14

OBJ$:PRCER,LIS$:PRCER/-SP=SRC$:MACFLM,FCSPR,PRCER

