

; Bliss-32 10.1-416	Monday 21-AUG-1978 19:35:12	DBB3:[RTL.SRC]LMATCH.B32;14					Page 1

;

;00100  0001	MODULE LIB$MATCH_COND (	! Library Match Condition Value List 

;00200  0002		IDENT = '0-09',	! File: LMATCH.B32

;00300  0003		LINKAGE(FORTRAN)

;00400  0004		) =

;00500  0005	BEGIN

;00600  0006	

;00700  0007	!

;00800  0008	!			  COPYRIGHT (c) 1977 BY

;00900  0009	!	      DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

;01000  0010	!

;01100  0011	! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED

;01200  0012	! ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE

;01300  0013	! INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER

;01400  0014	! COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY

;01500  0015	! OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY

;01600  0016	! TRANSFERRED.

;01700  0017	!

;01800  0018	! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE

;01900  0019	! AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT

;02000  0020	! CORPORATION.

;02100  0021	!

;02200  0022	! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS

;02300  0023	! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.

;02400  0024	!

;02500  0025	

;02600  0026	!++

;02700  0027	! FACILITY:  General Utility Library

;02800  0028	!

;02900  0029	! ABSTRACT:

;03000  0030	!

;03100  0031	! Check for a match between the condition value addressed by the

;03200  0032	! first parameter and the condition value addressed by the subsequent

;03300  0033	! parameters.  Each parameter is the address of a condition value.

;03400  0034	! Only the pertinent fields are checked within the condition value.

;03500  0035	!

;03600  0036	! ENVIRONMENT:  User Mode - AST re-entrant

;03700  0037	!

;03800  0038	! AUTHOR:  Donald G. Petersen, CREATION DATE:  30-Nov-1977

;03900  0039	!

;04000  0040	! MODIFIED BY:

;04100  0041	!

;04200  0042	! 	Donald G. Petersen, 30-Nov-1977: VERSION 0

;04300  0043	! 0-1	- original

;04400  0044	! 0-2	- RETURN I - 1	DGP	05-DEC-77

;04500  0045	! 0-3	- add . (dot) operator to COND_VAL	DGP	05-DEC-77

;04600  0046	! 0-04	- Change to STARLET library.  DGP 20-Apr-78

;04700  0047	! 0-05	- Change REQUIRE files for VAX system build.  DGP 28-Apr-78

;04800  0048	! 0-06	- Change STARLET to RTLSTARLE to avoid conflicts.  DGP 1-May-78

;04810  0049	! 0-07	- Add check for facility specific bit.  TNH 17-June-78

;04900  0050	!--



; Bliss-32 10.1-416	Monday 21-AUG-1978 19:35:12	DBB3:[RTL.SRC]LMATCH.B32;14					Page 2

;

;00100  0051	!

;00200  0052	! TABLE OF CONTENTS:

;00300  0053	!

;00400  0054	

;00500  0055	FORWARD ROUTINE

;00600  0056		LIB$MATCH_COND;		! The routine which performs the comparisons. 

;00700  0057	

;00800  0058	!

;00900  0059	! INCLUDE FILES:

;01000  0060	!

;01100  0061		REQUIRE 'RTLIN:LPSECT';	! Define DECLARE PSECTS macro

; %PRINT:	 REQUIRE FILE: LPSECT.B32, VERSION 01-5, TNH, 27-Jun-78

;01200  0115		LIBRARY 'RTLSTARLE';	! STARLET library for macros and symbols

;01300  0116	!

;01400  0117	! MACROS:

;01500  0118	!

;01600  0119	!	NONE	

;01700  0120	!

;01800  0121	! EQUATED SYMBOLS:

;01900  0122	!

;02000  0123	!	NONE	

;02100  0124	!

;02200  0125	! PSECT DECLARATIONS:

;02300  0126	!

;02400  0127	

;02500  0128		DECLARE_PSECTS (LIB);		! declare PSECTs for LIB$ facility

;02600  0129	

;02700  0130	!

;02800  0131	! OWN STORAGE:

;02900  0132	!

;03000  0133	!	NONE	

;03100  0134	!

;03200  0135	! EXTERNAL REFERENCES:

;03300  0136	!

;03400  0137	!	NONE	



; Bliss-32 10.1-416	Monday 21-AUG-1978 19:35:12	DBB3:[RTL.SRC]LMATCH.B32;14					Page 3

;

;00100  0138	GLOBAL ROUTINE LIB$MATCH_COND ( ! Routine which compares condition values 

;00200  0139	    COND_VAL,			! Adr. of desired condition value

;00300  0140	    COND_VAL_I)			! Adr. of condition value to compare

;00400  0141	    =

;00500  0142	!++

;00600  0143	! FUNCTIONAL DESCRIPTION:

;00700  0144	!

;00800  0145	! This routine will take a portion (STS$V_COND_ID) of the condition value pointed

;00900  0146	! to by the first parameter and compare it to the same portion of the condition

;01000  0147	! value pointed to by the second through nth parameters.

;01002  0148	! If the facility specific bit (STS$V_FAC_SP) is set, the facility

;01004  0149	! number (STS$V_FAC_NO), the facility specific bit , and the message

;01006  0150	! code (STS$V_CODE) are included in the compare (STS$V_COND_ID).

;01008  0151	! Otherwise, only the facility specific bit and the code are included (STS$V_MSG_NO).

;01010  0152	! The routine returns a 0 if

;01100  0153	! a match is not found, a 1 if the second parameter matches, a 2 if the third

;01200  0154	! parameter matches and so on.  A check is made for null parameter entries in the 

;01300  0155	! parameter list although the index is still incremented.

;01400  0156	!

;01500  0157	! FORMAL PARAMETERS:

;01600  0158	!

;01700  0159	! 	cond_val.rlc.r			  Adr. of desired value

;01800  0160	!	{cond_val_i.rlc.r}		  Adr. of value to compare

;01900  0161	!

;02000  0162	! IMPLICIT INPUTS:

;02100  0163	!

;02200  0164	!	NONE

;02300  0165	!

;02400  0166	! IMPLICIT OUTPUTS:

;02500  0167	!

;02600  0168	!	NONE

;02700  0169	!

;02800  0170	! ROUTINE VALUE:

;02900  0171	!

;03000  0172	!	index.wlu.v

;03100  0173	!	0, if no match found

;03200  0174	!	i, for match between the 1st and (i+1)th parameter

;03300  0175	!

;03400  0176	! SIDE EFFECTS:

;03500  0177	!

;03600  0178	!	NONE

;03700  0179	!

;03800  0180	!--

;03900  0181	

;04000  0182	!+

;04100  0183	!   Check for a null parameter each iteration.

;04200  0184	!   If not a null parameter then compare the 1st and (i+1)th parameters

;04300  0185	!   If no match is found by the time all parameters are exhausted then return a 0.

;04400  0186	!-

;04500  0187	



; Bliss-32 10.1-416	Monday 21-AUG-1978 19:35:12	DBB3:[RTL.SRC]LMATCH.B32;14					Page 4

;

;04600  0188	    BEGIN

;04610  0189	    IF .BLOCK[.COND_VAL, STS$V_FAC_SP; , BYTE]

;04620  0190	    THEN			! Facility specific bit set

;04660  0191		BEGIN

;04700  0192		INCR I FROM 2 TO ACTUALCOUNT() DO

;04800  0193		    IF NOT NULLPARAMETER(.I)

;04900  0194		    THEN

;05000  0195			IF .BLOCK[.COND_VAL, STS$V_COND_ID; , BYTE] EQLU .BLOCK[ACTUALPARAMETER(.I), STS$V_COND_ID; , BYTE]

;05100  0196			THEN

;05200  0197			   RETURN .I - 1

;05201  0198		END

;05202  0199	

;05205  0200	    ELSE			! Facility specific bit not set

;05207  0201	

;05208  0202		BEGIN

;05209  0203	

;05210  0204		INCR I FROM 2 TO ACTUALCOUNT() DO

;05220  0205		    IF NOT NULLPARAMETER(.I)

;05230  0206		    THEN

;05240  0207			IF .BLOCK[.COND_VAL, STS$V_MSG_NO; , BYTE] EQLU .BLOCK[ACTUALPARAMETER(.I), STS$V_MSG_NO; , BYTE]

;05250  0208			THEN

;05260  0209			   RETURN .I - 1

;05265  0210		END;

;05270  0211	

;05300  0212	    RETURN 0

;05400  0213	    END;





							    .TITLE  LIB$MATCH_COND

							    .IDENT  \0-09\







							    .PSECT  LIB$CODE,NOWRT,  SHR,  PIC,2



					 000C 00000 	    .ENTRY  LIB$MATCH_COND, Save R2,R3				      ; 0138

	   2B 	    04   BC	       0F  E1 00002 	    BBC     #15, @COND_VAL, 3$					      ; 0189

		         52 	       6C  9A 00007 	    MOVZBL  (AP), R2						      ; 0192

		         50 	       01  D0 0000A 	    MOVL    #1, I						      ; 0191

				       1D  11 0000D 	    BRB     2$							      ;

	   6C 	         08 	       00  ED 0000F 1$:     CMPZV   #0, #8, (AP), I					      ; 0193

				       50     00013									      ;

				       16  19 00014 	    BLSS    2$							      ;

				     6C40  D5 00016 	    TSTL    (AP)[I]						      ;

				       11  13 00019 	    BEQL    2$							      ;

		         51 	     6C40  D0 0001B 	    MOVL    (AP)[I], R1						      ; 0195

	   61 	         19 	       03  EF 0001F 	    EXTZV   #3, #25, (R1), R3					      ;

				       53     00023									      ;

      04   BC	         19 	       03  ED 00024 	    CMPZV   #3, #25, @COND_VAL, R3				      ;

				       53     00029									      ;

				       2B  13 0002A 	    BEQL    5$							      ;

	   DF 	         50 	       52  F3 0002C 2$:     AOBLEQ  R2, I, 1$						      ; 0191

				       31  11 00030 	    BRB     7$							      ; 0189

		         52 	       6C  9A 00032 3$:     MOVZBL  (AP), R2						      ; 0204

		         50 	       01  D0 00035 	    MOVL    #1, I						      ; 0202



; Bliss-32 10.1-416	Monday 21-AUG-1978 19:35:12	DBB3:[RTL.SRC]LMATCH.B32;14					Page 4-1

;

				       25  11 00038 	    BRB     6$							      ;

	   6C 	         08 	       00  ED 0003A 4$:     CMPZV   #0, #8, (AP), I					      ; 0205

				       50     0003E									      ;

				       1E  19 0003F 	    BLSS    6$							      ;

				     6C40  D5 00041 	    TSTL    (AP)[I]						      ;

				       19  13 00044 	    BEQL    6$							      ;

		         51 	     6C40  D0 00046 	    MOVL    (AP)[I], R1						      ; 0207

	   61 	         0D 	       03  EF 0004A 	    EXTZV   #3, #13, (R1), R3					      ;

				       53     0004E									      ;

      04   BC	         0D 	       03  ED 0004F 	    CMPZV   #3, #13, @COND_VAL, R3				      ;

				       53     00054									      ;

				       08  12 00055 	    BNEQ    6$							      ;

		         51 	  FF   A0  9E 00057 5$:     MOVAB   -1(R0), R1						      ; 0209

		         50 	       51  D0 0005B 	    MOVL    R1, R0						      ;

					   04 0005E 	    RET     							      ;

	   D7 	         50 	       52  F3 0005F 6$:     AOBLEQ  R2, I, 4$						      ; 0202

				       50  D4 00063 7$:     CLRL    R0							      ; 0212

					   04 00065 	    RET     							      ; 0138



; Routine Size:  102 bytes





;05500  0214	   END

;05600  0215	   ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  LIB$CODE       	   102  NOWRT,  RD ,  EXE,  SHR,  LCL,  REL,  CON,  PIC,ALIGN(2)









;				LIBRARY STATISTICS

;

;					     -------- Symbols --------    Blocks

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]STARLET.L32;1		      2688         3         0       108











; Size:		102 code + 0 data bytes

; Run Time:	00:03.7

; Elapsed Time:	00:15.1

; Memory Used:	145 pages

; Compilation Complete



; Bliss-32 10.1-416	Monday 21-AUG-1978 19:35:12									Page 4-2

;

