RSXGETMSG                                                        22-AUG-1978 00:29:31   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)     137  DECLARATIONS

   (1)     167  RSX$GETMSG

RSXGETMSG                                                        22-AUG-1978 00:29:31   VAX-11 MACRO X0.3-11               Page   1

00                                                                                                                               (1)



                                     0000     1 	.TITLE	RSXGETMSG

                                     0000     2 	.IDENT	/00/

                                     0000     3 

                                     0000     4 ;

                                     0000     5 ;		COPYRIGHT (C) 1977

                                     0000     6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000     7 ;

                                     0000     8 ; THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE

                                     0000     9 ; COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

                                     0000    10 ; ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

                                     0000    11 ; MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

                                     0000    12 ; EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

                                     0000    13 ; TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

                                     0000    14 ; REMAIN IN DEC.

                                     0000    15 ;

                                     0000    16 ; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

                                     0000    17 ; AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

                                     0000    18 ; CORPORATION.

                                     0000    19 ;

                                     0000    20 ; DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS

                                     0000    21 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

                                     0000    22 

                                     0000    23 ;++

                                     0000    24 ; FACILITY:

                                     0000    25 ;

                                     0000    26 ;	STAND-ALONE STARTLET AME

                                     0000    27 ;

                                     0000    28 ;

                                     0000    29 ; ABSTRACT:

                                     0000    30 ;

                                     0000    31 ;	THIS MODULE RETURNS A MESSAGE ASSOCIATED WITH THE CODE SPECIFIED

                                     0000    32 ;	BY THE CALLER

                                     0000    33 ;

                                     0000    34 ;

                                     0000    35 ; ENVIRONMENT:

                                     0000    36 ;

                                     0000    37 ;	VAX NATIVE MODE USER CODE

                                     0000    38 ;

                                     0000    39 ;

                                     0000    40 ; AUTHOR: C. A. MONIA	, CREATION DATE: 26-OCT-77

                                     0000    41 ;

                                     0000    42 ; MODIFIED BY:

                                     0000    43 ;

                                     0000    44 ;	, : VERSION

                                     0000    45 ; 01	- 

                                     0000    46 ;--

RSXGETMSG                                                        22-AUG-1978 00:29:31   VAX-11 MACRO X0.3-11               Page   2

00              DECLARATIONS                                                                                                     (1)



                                     0000    48 	.SBTTL	DECLARATIONS

                                     0000    49 ;

                                     0000    50 ; INCLUDE FILES:

                                     0000    51 ;

                                     0000    52 ; MACROS:

                                     0000    53 ;

                                     0000    54  

                                     0000    55 	$STSDEF				; DEFINE FORMAT OF CONDITION CODE

                                     0000    56 

                                     0000    57 ;

                                     0000    58 ; EQUATED SYMBOLS:

                                     0000    59 ;

                                     0000    60 ; DEFINE OFFSETS TO ARGUMENTS

                                     0000    61 ;

                                     0000    62  

                                     0000    63 	.SAVE

                                 00000000    64 	.PSECT	$ABS$,ABS

                           00000000  0000    65 .=0

                           00000004  0000    66 ARG:	.BLKL	1			; NUMBER OF ARGUMENTS

                           00000008  0004    67 ERROR:	.BLKL	1			; ERROR CODE

                           0000000C  0008    68 LENGTH:	.BLKL	1			; POINTER TO LENGTH OF RETURNED STRING

                           00000010  000C    69 BUFFER:	.BLKL	1			; ADDRESS OF BUFFER DESCRIPTOR

                                     0010    70  

                                     0000    71 	.RESTORE

                                     0000    72  

                                     0000    73 ;

                                     0000    74 ; OWN STORAGE:

                                     0000    75 ;

                                     0000    76 

RSXGETMSG                                                        22-AUG-1978 00:29:31   VAX-11 MACRO X0.3-11               Page   3

00              RSX$GETMSG                                                                                                       (1)



                                     0000    78 	.SBTTL RSX$GETMSG

                                     0000    79 ;++

                                     0000    80 ; FUNCTIONAL DESCRIPTION:

                                     0000    81 ;

                                     0000    82 ; THIS PROCEDURE IS CALLED TO SEARCH A LIST OF ERROR MESSAGES AND RETURN

                                     0000    83 ; THE TEXT TO THE CALLER. IT ATTACHES THE APPROPRIATE PREFIX TO THE MESS-

                                     0000    84 ; AGE BASED ON THE SEVERITY CODE.

                                     0000    85 ;

                                     0000    86 ; CALLING SEQUENCE:

                                     0000    87 ;

                                     0000    88 ;	CALL RSX$GETMSG (ERROR,LENGTH,BUFFER)

                                     0000    89 ;

                                     0000    90 ; INPUT PARAMETERS:

                                     0000    91 ;

                                     0000    92 ;	ERROR = LONGWORD CONTAINING THE ERROR CODE IN STANDARD VAX FORMAT

                                     0000    93 ;

                                     0000    94 ;	LENGTH = LONGWORD TO RECEIVE THE MESSAGE BYTE COUNT

                                     0000    95 ;

                                     0000    96 ;	BUFFER = ADDRESS OF BUFFER DESCRIPTOR

                                     0000    97 ;

                                     0000    98 ; IMPLICIT INPUTS:

                                     0000    99 ;

                                     0000   100 ;	RSX$A_MSGTXT = ADDRESS OF MESSAGE LIST

                                     0000   101 ;

                                     0000   102 ;	RSX$A_MSGPRE = ADDRESS OF MESSAGE PREFIX LIST

                                     0000   103 ;

                                     0000   104 ;

                                     0000   105 ; OUTPUT PARAMETERS:

                                     0000   106 ;

                                     0000   107 ;

                                     0000   108 ;	LENGTH = LONGWORD TO RECEIVE THE NUMBER OF BYTES IN THE MESSAGE

                                     0000   109 ;		 STRING.

                                     0000   110 ;

                                     0000   111 ; IMPLICIT OUTPUTS:

                                     0000   112 ;

                                     0000   113 ;	NONE

                                     0000   114 ;

                                     0000   115 ; COMPLETION CODES:

                                     0000   116 ;

                                     0000   117 ;	NONE

                                     0000   118 ;

                                     0000   119 ; SIDE EFFECTS:

                                     0000   120 ;

                                     0000   121 ;	NONE

                                     0000   122 ;

                                     0000   123 ;--

                                     0000   124  

                                 00000000   125 	.PSECT	RSXCODE	NOWRT

                                     0000   126  

                                     0000   127  

                                     0000   128 RSX$GETMSG::				;

                               00FE  0000   129 	.WORD	^M<R1,R2,R3,R4,R5,R6,R7> ; SAVE R1 - R7

                          56     D4  0002   130 	CLRL	R6			; CLEAR LENGTH

            0C            03     EF  0004   131 	EXTZV	#STS$V_CODE,#STS$S_CODE,ERROR(AP),R7 ; EXTRACT MESSAGE NUMBER

            57         04 AC         0007       

                          00     EF  000A   132 	EXTZV	#STS$V_SEVERITY,#STS$S_SEVERITY,- ; EXTRACT SEVERITY FIELD

         04 AC            03         000C   133 		ERROR(AP),R1		;

RSXGETMSG                                                        22-AUG-1978 00:29:31   VAX-11 MACRO X0.3-11               Page   4

00              RSX$GETMSG                                                                                                       (1)



                          51         000F       

            53   00000000'EF     9E  0010   134 	MOVAB	RSX$A_MSGPRE-MSG_SIZE,R3 ; GET ADDRESS OF PREFIXES

                          15     10  0017   135 	BSBB	10$			; GET PREFIX

                          50     D5  0019   136 	TSTL	R0			; BUFFER TOO SMALL?

                          0C     12  001B   137 	BNEQ	5$			; IF NEQ YES, SOME UNMOVED DATA

            51            57     D0  001D   138 	MOVL	R7,R1			; GET MESSAGE CODE

            53   00000000'EF     9E  0020   139 	MOVAB	RSX$A_MSGTXT-MSG_SIZE,R3 ; GET ADDRESS OF MESSAGE LIST

                          05     10  0027   140 	BSBB	10$			; GET MESSAGE STRING

                                     0029   141 5$:					;

         08 BC            56     D0  0029   142 	MOVL	R6,@LENGTH(AP)		; RETURN LENGTH

                                 04  002D   143 	RET				;

                                     002E   144  

                                     002E   145 ;

                                     002E   146 ; SEARCH FOR SPECIFIED ERROR CODE

                                     002E   147 ;

                                     002E   148  

                                     002E   149 10$:					;

            53            00'    C0  002E   150 	ADDL	S^#MSG_SIZE,R3		; POINT TO NEXT BLOCK

                          63     D5  0031   151 	TSTL	(R3)			; AT END OF LIST

                          1F     13  0033   152 	BEQL	20$			; IF EQL YES

         00'A3            51     B1  0035   153 	CMPW	R1,B^MSG_CODE(R3)	; HAVE CODE?

                          F3     12  0039   154 	BNEQ	10$			; IF NEQ NO

            54         0C BC     7D  003B   155 	MOVQ	@BUFFER(AP),R4		; GET BUFFER DESCRIPTOR

            55            56     C0  003F   156 	ADDL	R6,R5			; ADD LENGTH OF STRING MOVED SO FAR

            54            56     A2  0042   157 	SUBW	R6,R4			; SUBTRACT FROM REMAINING BUFFER SIZE

            56         00'A3     A0  0045   158 	ADDW	B^MSG_LENGTH(R3),R6	; UPDATE LENGTH

                       00'A3     2C  0049   159 	MOVC5	B^MSG_LENGTH(R3),@B^MSG_ADDR(R3),- ; MOVE STRING

            00         00'B3         004C   160 		#0,R4,(R5)		;

            65            54         004F       

            56            50     A2  0051   161 	SUBW	R0,R6			; SUBTRACT NUMBER OF UNMOVED BYTES

                                     0054   162 20$:					;

                                 05  0054   163 	RSB				;

                                     0055   164  

                                     0055   165 	.END

RSXGETMSG                                                        22-AUG-1978 00:29:31   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (1)



ARG              00000000            

BIT...         = 00000020            

BUFFER           0000000C            

C$$ORE         = 00000000            

ERROR            00000004            

GBL...         = 00000000            

LENGTH           00000008            

MSG_ADDR         ********   X   03   

MSG_CODE         ********   X   03   

MSG_LENGTH       ********   X   03   

MSG_SIZE         ********   X   03   

RSX$A_MSGPRE     ********   X   03   

RSX$A_MSGTXT     ********   X   03   

RSX$GETMSG       00000000 RG    03   

STS$K_ERROR    = 00000002            

STS$K_SEVERE   = 00000004            

STS$K_SUCCESS  = 00000001            

STS$K_WARNING  = 00000000            

STS$M_CODE     = 00007FF8            

STS$M_COND_ID  = 0FFFFFF8            

STS$M_CONTROL  = F0000000            

STS$M_CUST_DEF = 08000000            

STS$M_FAC_NO   = 0FFF0000            

STS$M_FAC_SP   = 00008000            

STS$M_INHIB_MSG= 10000000            

STS$M_MSG_NO   = 0000FFF8            

STS$M_SEVERITY = 00000007            

STS$M_SUCCESS  = 00000001            

STS$S_CODE     = 0000000C            

STS$S_COND_ID  = 00000019            

STS$S_CONTROL  = 00000004            

STS$S_CUST_DEF = 00000001            

STS$S_FAC_NO   = 0000000C            

STS$S_FAC_SP   = 00000001            

STS$S_INHIB_MSG= 00000001            

STS$S_MSG_NO   = 0000000D            

STS$S_SEVERITY = 00000003            

STS$S_SUCCESS  = 00000001            

STS$V_CODE     = 00000003            

STS$V_COND_ID  = 00000003            

STS$V_CONTROL  = 0000001C            

STS$V_CUST_DEF = 0000001B            

STS$V_FAC_NO   = 00000010            

STS$V_FAC_SP   = 0000000F            

STS$V_INHIB_MSG= 0000001C            

STS$V_MSG_NO   = 00000003            

STS$V_SEVERITY = 00000000            

STS$V_SUCCESS  = 00000000            





PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

$ABS$            00000010      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

RSXCODE          00000055      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD  NOWRT BYTE  



RSXGETMSG                                                        22-AUG-1978 00:29:31   VAX-11 MACRO X0.3-11               Page   6

PROGRAM SECTION SYNOPSIS                                                                                                         (1)





THERE WERE NO ERRORS OR WARNINGS.

25694. BYTES LEFT IN FREE MEMORY POOL.

298. BYTES OF RECLAIMED MEMORY.

OBJ$:RSXGETMSG,LIS$:RSXGETMSG/-SP=SRC$:C,RSXGETMSG

16 MLB DIR RDS - 97 GETS TO DEFINE 7 MACROS. 7 INTER. FILE WRITES. 

