XST$NEQ String Comparison Funct 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 1 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRNEQ.BLI;1 0 1 MODULE STRNEQ ( IDENT = 'X00.04' %TITLE 'XST$NEQ String Comparison Function' 0 2 %BLISS32( ,ADDRESSING_MODE( EXTERNAL=LONG_RELATIVE ) ) 0 3 %BLISS36( ,ENTRY( XST$NEQ ),OTS='' ) 0 4 ) = 0 5 BEGIN 1 6 1 7 ! 1 8 ! COPYRIGHT (c) 1980 BY 1 9 ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 1 10 ! 1 11 ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED 1 12 ! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE 1 13 ! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER 1 14 ! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY 1 15 ! OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY 1 16 ! TRANSFERRED. 1 17 ! 1 18 ! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE 1 19 ! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT 1 20 ! CORPORATION. 1 21 ! 1 22 ! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS 1 23 ! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. 1 24 ! 1 25 1 26 !++ 1 27 ! 1 28 ! FACILITY: BLISS Library 1 29 ! 1 30 ! ABSTRACT: 1 31 ! 1 32 ! This module implements the $STR_NEQ function. 1 33 ! 1 34 ! ENVIRONMENT: User mode - multiple host operating/file systems 1 35 ! 1 36 ! AUTHOR: Ward Clark, CREATION DATE: 15-Feb-80 1 37 ! 1 38 !-- STRNEQ XST$NEQ String Comparison Funct 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 2 X00.04 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRNEQ.BLI;1 1 40 ! 1 41 ! TABLE OF CONTENTS: 1 42 ! 1 43 1 44 FORWARD ROUTINE 1 45 XST$NEQ; ! String comparison routine 1 46 1 47 ! 1 48 ! INCLUDE FILES: 1 49 ! 1 50 1 51 LIBRARY 'XPORT' ; ! Public XPORT control block and macro definitions 1 53 LIBRARY 'XPOSYS' ; ! Internal XPORT macro definitions 1 55 1 56 $XPO_SYS_TEST( $ALL ) ; %PRINT: This module was compiled for any VAX-11 system ; %PRINT: XPORT V1.3-51 XPOSYS V1.3-16 XPO$K_VERSION = 1 XPO$K_LEVEL = 3 1 57 1 58 ! 1 59 ! MACROS: 1 60 ! 1 61 1 62 ! 1 63 ! EQUATED SYMBOLS: 1 64 ! 1 65 1 66 ! 1 67 ! PSECT DECLARATIONS: 1 68 ! 1 69 1 70 $XPO_PSECTS ! Declare XPORT PSECT names and attributes 1 71 1 72 ! 1 73 ! OWN STORAGE: 1 74 ! 1 75 1 76 OWN 1 77 function_text : $STR_DESCRIPTOR( STRING = ' not equal to ' ); 1 78 1 79 ! 1 80 ! EXTERNAL REFERENCES: 1 81 ! STRNEQ XST$NEQ String Comparison Funct 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 3 X00.04 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRNEQ.BLI;1 1 83 GLOBAL ROUTINE XST$NEQ( options, string1, string2, fill, success_action, failure_action ) = 1 84 1 85 !++ 1 86 ! 1 87 ! FUNCTIONAL DESCRIPTION: 1 88 ! 1 89 ! This routine implements the $STR_NEQ function. 1 90 ! 1 91 ! FORMAL PARAMETERS: 1 92 ! 1 93 ! options - string handling options 1 94 ! string1 - address of a string descriptor 1 95 ! string2 - address of a string descriptor 1 96 ! fill - optional fill character 1 97 ! success_action - address of a success action routine 1 98 ! failure_action - address of a failure action routine 1 99 ! 1 100 ! IMPLICIT INPUTS: 1 101 ! 1 102 ! None 1 103 ! 1 104 ! IMPLICIT OUTPUTS: 1 105 ! 1 106 ! None 1 107 ! 1 108 ! COMPLETION CODES: (secondary passed to action routine only) 1 109 ! 1 110 ! completion code from CH$NEQ function ( 0, 1 ) 1 111 ! 1 112 ! STR$_BAD_STRNG1 - invalid primary string 1 113 ! secondary = failure completion code from $STR_VALIDATE 1 114 ! STR$_BAD_STRNG2 - invalid secondary string 1 115 ! secondary = failure completion code from $STR_VALIDATE 1 116 ! 1 117 ! SIDE EFFECTS: 1 118 ! 1 119 ! None 1 120 ! 1 121 !-- 1 122 1 123 BEGIN 2 124 2 125 MAP 2 126 options : $STR_OPTIONS, 2 127 string1 : REF $STR_DESCRIPTOR(), 2 128 string2 : REF $STR_DESCRIPTOR(); 2 129 2 130 MACRO 2 131 length1 = string1[STR$H_LENGTH] %, 2 132 pointer1 = string1[STR$A_POINTER] %, 2 133 length2 = string2[STR$H_LENGTH] %, 2 134 pointer2 = string2[STR$A_POINTER] %; 2 135 2 136 ! 2 137 ! Initialization 2 138 ! 2 139 STRNEQ XST$NEQ String Comparison Funct 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 4 X00.04 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRNEQ.BLI;1 2 140 $STR_MAIN_BEGIN( COMPARE ) 3 141 3 142 $STR_VALIDATE( .string1, BAD_STRNG1 ); ! Validate the two input string descriptors. 3 143 $STR_VALIDATE( .string2, BAD_STRNG2 ); 3 144 3 145 ! 3 146 ! Perform a normal comparison if a fill character was specified or the strings are the same length. 3 147 ! 3 148 3 149 IF .fill NEQ -1 OR .length1 EQL .length2 3 150 THEN 3 151 $STR_QUIT(( CH$NEQ( .length1, .pointer1, .length2, .pointer2, .fill ) )); 3 152 3 153 ! 3 154 ! Perform special comparison processing if no fill character was specified. 3 155 ! 3 156 3 157 $STR_QUIT( (1) ); ! Strings of unequal length are always "not equal". 3 158 3 159 $STR_MAIN_END; 2 160 2 161 ! 2 162 ! Call an appropriate action routine. 2 163 ! 2 164 2 165 $STR_ACTION_RTN( function_text, .string1, .string2 ); 2 166 2 167 ! 2 168 ! Free any temporary XPORT strings input to this comparison function. 2 169 ! 2 170 2 171 IF NOT .options[STR$V_NO_FREE_T] ! Unless this is an internal XPORT call, 2 172 THEN ! 2 173 BEGIN ! 3 174 $STR_FREE_TEMP( .string1 ); ! free any temporary input strings. 3 175 $STR_FREE_TEMP( .string2 ); 3 176 END; 2 177 2 178 ! 2 179 ! Return the final completion code to the caller. 2 180 ! 2 181 2 182 RETURN .primary_code 2 183 2 184 END; 1 185 END 1 186 ELUDOM STRNEQ Machine Code Listing 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 5 X00.04 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRNEQ.BLI;1 .psect _XPO$CODE, CON, LCL, SHR, EXE, NOWRT, NOVEC .proc XST$NEQ .align 32 .global XST$NEQ XST$NEQ: // 000083 { .mii 002C0183CD40 0000 alloc r53 = rspfs, 6, 18, 6, 0 010800100DC0 0001 mov r55 = r1 000188000D00 0002 mov r52 = br0 } { .mii 012000002640 0010 mov r25 = 1 // 000142 0000B2100E00 0011 sxt4 r56 = STRING1 // r56 = r33 010800000A00 0012 mov SECONDARY_CODE = r0 ;; // r40 = r0 // 000140 } { .mib 000008000000 0020 nop.m 0 000198000D80 0021 mov r54 = pr // 000083 00A000001000 0022 br.call.sptk.many br0 = XST$VALIDATE // 000142 } { .mib 010803700040 0030 mov r1 = r55 00A0308001C0 0031 tbit.z pr7, pr6 = $STR$STATUS, 0 // pr7, pr6 = r8, 0 008600006006 0032 (pr6) br.cond.dpnt.few L$2 } { .mlx 010800800A00 0040 mov SECONDARY_CODE = $STR$STATUS // r40 = r8 800000000000 0041 movl PRIMARY_CODE = 2402386 // r41 = 2402386 0195025494 } { .mfb 000008000000 0050 nop.m 0 000008000000 0051 nop.f 0 008000024000 0052 br.sptk.few L$4 ;; } 0060 L$2: // 000143 { .mib 012000002640 0060 mov r25 = 1 0000B2200E00 0061 sxt4 r56 = STRING2 // r56 = r34 00A000001000 0062 br.call.sptk.many br0 = XST$VALIDATE } { .mib 010803700040 0070 mov r1 = r55 00A0308001C0 0071 tbit.z pr7, pr6 = $STR$STATUS, 0 // pr7, pr6 = r8, 0 008600006006 0072 (pr6) br.cond.dpnt.few L$5 } { .mlx 010800800A00 0080 mov SECONDARY_CODE = $STR$STATUS // r40 = r8 800000000000 0081 movl PRIMARY_CODE = 2402394 // r41 = 2402394 0195025694 } { .mfb 000008000000 0090 nop.m 0 000008000000 0091 nop.f 0 00800001C000 0092 br.sptk.few L$4 ;; } 00A0 L$5: STRNEQ Machine Code Listing 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 6 X00.04 XST$NEQ 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRNEQ.BLI;1 { .mfb 01DC423FE000 00A0 cmp4.eq pr0, pr8 = -1, FILL // pr0, pr8 = -1, r35 // 000149 000008000000 00A1 nop.f 0 008600008008 00A2 (pr8) br.cond.dpnt.few L$13 } { .mii 000008000000 00B0 nop.m 0 0000B2200AC0 00B1 sxt4 r43 = STRING2 // r43 = r34 0000B2100A80 00B2 sxt4 r42 = STRING1 ;; // r42 = r33 } { .mmi 008042B00AC0 00C0 ld2 r43 = [r43] 008042A00A80 00C1 ld2 r42 = [r42] 000008000000 00C2 nop.i 0 ;; } { .mfb 01C45AB54000 00D0 cmp4.eq pr0, pr11 = r42, r43 000008000000 00D1 nop.f 0 00860001200B 00D2 (pr11) br.cond.dpnt.few L$14 } 00E0 L$13: { .mii 0120080FEC00 00E0 mov r48 = 255 // 000151 0000B2200B40 00E1 sxt4 r45 = STRING2 // r45 = r34 0000B2100B00 00E2 sxt4 r44 = STRING1 // r44 = r33 } { .mib 010800000A40 00F0 mov PRIMARY_CODE = r0 // r41 = r0 0000923008C0 00F1 zxt4 r35 = FILL // r35 = r35 004000000000 00F2 nop.b 0 ;; } { .mii 010802D08B40 0100 adds r45 = 4, r45 010802C08B00 0101 adds r44 = 4, r44 0100630468C0 0102 and r35 = r35, r48 ;; } { .mii 00B08ADF8BC0 0110 ld4 r47 = [r45], -4 010802300F00 0111 mov r60 = r35 000008000000 0112 nop.i 0 ;; } { .mmi 00B08ACF8B80 0120 ld4 r46 = [r44], -4 008042D00EC0 0121 ld2 r59 = [r45] 0000B2F00E80 0122 sxt4 r58 = r47 ;; } { .mib 008042C00E40 0130 ld2 r57 = [r44] 0000B2E00E00 0131 sxt4 r56 = r46 00A000001000 0132 br.call.sptk.many br0 = OTS$STRCMP_EQLP } { .mii 010178802200 0140 xor r8 = 1, r8 010803700040 0141 mov r1 = r55 ;; 01C010010000 0142 cmp.eq pr0, pr2 = r8, r0 ;; } { .mfb STRNEQ Machine Code Listing 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 7 X00.04 XST$NEQ 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRNEQ.BLI;1 010800002A42 0150 (pr2) adds PRIMARY_CODE = 1, r0 // r41 = 1, r0 000008000000 0151 nop.f 0 008000004000 0152 br.sptk.few L$4 ;; } 0160 L$14: // 000149 { .mfi 012000002A40 0160 mov PRIMARY_CODE = 1 // r41 = 1 // 000157 000008000000 0161 nop.f 0 000008000000 0162 nop.i 0 ;; } 0170 L$4: // 000165 { .mii 01C400052180 0170 cmp4.eq pr6, pr0 = PRIMARY_CODE, r0 // pr6, pr0 = r41, r0 00A042900240 0171 tbit.z pr9, pr8 = PRIMARY_CODE, 0 ;; // pr9, pr8 = r41, 0 01C248000206 0172 (pr6) cmp.eq.or.andcm pr8, pr9 = r0, r0 ;; } { .mmi 010802500C49 0180 (pr9) mov r49 = FAILURE_ACTION ;; // r49 = r37 010802400C48 0181 (pr8) mov r49 = SUCCESS_ACTION // r49 = r36 000008000000 0182 nop.i 0 ;; } { .mfb 01C4031002C0 0190 cmp4.eq pr11, pr0 = r0, $STR$ACTION // pr11, pr0 = r0, r49 000008000000 0191 nop.f 0 00860001000B 0192 (pr11) br.cond.dpnt.few L$16 } { .mii 01200000C640 01A0 mov r25 = 6 0000B2800E80 01A1 sxt4 r58 = SECONDARY_CODE // r58 = r40 0000B3100C40 01A2 sxt4 r49 = $STR$ACTION // r49 = r49 } { .mii 012000100A00 01B0 add r40 = @ltoff(FUNCTION_TEXT), r1 0000B2200F40 01B1 sxt4 r61 = STRING2 // r61 = r34 0000B2100F00 01B2 sxt4 r60 = STRING1 ;; // r60 = r33 } { .mii 0080C2800A00 01C0 ld8 r40 = FUNCTION_TEXT // r40 = [r40] 012000002E00 01C1 mov r56 = 1 010803110C40 01C2 adds r49 = 8, r49 ;; } { .mii 000008000000 01D0 nop.m 0 0000B2900E40 01D1 sxt4 r57 = PRIMARY_CODE // r57 = r41 0000B2800EC0 01D2 sxt4 r59 = r40 } { .mmi 00B0CB1F0040 01E0 ld8 r1 = [r49], -8 ;; 0080C3100C40 01E1 ld8 r49 = [r49] 000008000000 01E2 nop.i 0 ;; } { .mib 000008000000 01F0 nop.m 0 000E00162180 01F1 mov br6 = r49 00210000C000 01F2 br.call.sptk.few br0 = br6 } { .mii STRNEQ Machine Code Listing 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 8 X00.04 XST$NEQ 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRNEQ.BLI;1 010800800A40 0200 mov PRIMARY_CODE = r8 // r41 = r8 010803700040 0201 mov r1 = r55 000008000000 0202 nop.i 0 } 0210 L$16: { .mii 000008000000 0210 nop.m 0 00A402038800 0211 extr.u r32 = OPTIONS, 14, 1 ;; // r32 = r32, 14, 1 // 000171 00A012000180 0212 tbit.z pr6, pr2 = r32, 0 } { .mfb 000008000000 0220 nop.m 0 000008000000 0221 nop.f 0 00860000C002 0222 (pr2) br.cond.dpnt.few L$17 } { .mib 012000002640 0230 mov r25 = 1 // 000174 0000B2100E00 0231 sxt4 r56 = STRING1 // r56 = r33 00A000001000 0232 br.call.sptk.many br0 = XST$FREE_TEMP ;; } { .mii 012000002640 0240 mov r25 = 1 // 000175 0000B2200E00 0241 sxt4 r56 = STRING2 // r56 = r34 010803700040 0242 mov r1 = r55 // 000174 } { .mfb 000008000000 0250 nop.m 0 000008000000 0251 nop.f 0 004000000000 0252 nop.b 0 ;; } { .mfb 000008000000 0260 nop.m 0 000008000000 0261 nop.f 0 00A000001000 0262 br.call.sptk.many br0 = XST$FREE_TEMP // 000175 } { .mfi 010803700040 0270 mov r1 = r55 000008000000 0271 nop.f 0 000008000000 0272 nop.i 0 } 0280 L$17: // 000171 { .mii 000008000000 0280 nop.m 0 00160006C7C0 0281 mov pr = r54, -65474 // 000182 0000B2900200 0282 sxt4 r8 = PRIMARY_CODE ;; // r8 = r41 } { .mii 000008000000 0290 nop.m 0 00015406A000 0291 mov.i rspfs = r53 000E00168000 0292 mov br0 = r52 ;; } { .mfb 000008000000 02A0 nop.m 0 000008000000 02A1 nop.f 0 000108001100 02A2 br.ret.sptk.many br0 ;; } .endp XST$NEQ STRNEQ Machine Code Listing 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 9 X00.04 XST$NEQ 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRNEQ.BLI;1 Routine Size: 688 bytes, Routine Base: _XPO$CODE + 0000 .psect _XPO$DATA, CON, LCL, NOSHR, NOEXE, WRT, NOVEC .lcomm FUNCTION_TEXT, 8, 8 .lcomm P.AAA, 14, 16 .psect _XPO$DATA, CON, LCL, NOSHR, NOEXE, WRT, NOVEC FUNCTION_TEXT: 000E 0000 data2 0xE // data2 14 0E 0002 data1 0xE // data1 14 01 0003 data1 0x1 // data1 1 00000000 0004 data4 P.AAA .psect _XPO$PLIT, CON, LCL, NOSHR, NOEXE, NOWRT, NOVEC P.AAA: 746F6E20 0000 string " not equal to " 75716520 0004 74206C61 0008 206F 000C .section .data .type XST$VALIDATE, @function .global XST$VALIDATE .section .data .type XST$VALIDATE, @function .global XST$VALIDATE .section .data .type OTS$STRCMP_EQLP, @function .global OTS$STRCMP_EQLP .section .data .type XST$FREE_TEMP, @function .global XST$FREE_TEMP .section .data .type XST$FREE_TEMP, @function .global XST$FREE_TEMP ; Library Statistics ; ; -------- Symbols -------- Pages ; File Total Loaded Percent Mapped ; ; DISK$NORMS_OWN:[LASTOVICA.XPORT.VMSGEN]XPORT.L32;14 ; 590 44 7 270 ; DISK$NORMS_OWN:[LASTOVICA.XPORT.VMSGEN]XPOSYS.L32;14 ; 91 17 18 27 Source Listing 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 10 Source Listing 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRNEQ.BLI;1 COMMAND LINE: BLISSSTRNEQ/LIST/DEBUG