XST$LSS 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]STRLSS.BLI;1 0 1 MODULE STRLSS ( IDENT = 'X00.04' %TITLE 'XST$LSS String Comparison Function' 0 2 %BLISS32( ,ADDRESSING_MODE( EXTERNAL=LONG_RELATIVE ) ) 0 3 %BLISS36( ,ENTRY( XST$LSS ),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_LSS 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 !-- STRLSS XST$LSS 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]STRLSS.BLI;1 1 40 ! 1 41 ! TABLE OF CONTENTS: 1 42 ! 1 43 1 44 FORWARD ROUTINE 1 45 XST$LSS; ! 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 = ' less than ' ); 1 78 1 79 ! 1 80 ! EXTERNAL REFERENCES: 1 81 ! STRLSS XST$LSS 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]STRLSS.BLI;1 1 83 GLOBAL ROUTINE XST$LSS( 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_LSS 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$LSS 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 STRLSS XST$LSS 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]STRLSS.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$LSS( .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 IF .length1 LSS .length2 3 158 THEN 3 159 $STR_QUIT(( CH$LEQ( .length1, .pointer1, .length1, .pointer2, 0 ) )) 4 160 ELSE 3 161 $STR_QUIT(( CH$LSS( .length2, .pointer1, .length2, .pointer2, 0 ) )); 3 162 3 163 $STR_MAIN_END; 2 164 2 165 ! 2 166 ! Call an appropriate action routine. 2 167 ! 2 168 2 169 $STR_ACTION_RTN( function_text, .string1, .string2 ); 2 170 2 171 ! 2 172 ! Free any temporary XPORT strings input to this comparison function. 2 173 ! 2 174 2 175 IF NOT .options[STR$V_NO_FREE_T] ! Unless this is an internal XPORT call, 2 176 THEN ! 2 177 BEGIN ! 3 178 $STR_FREE_TEMP( .string1 ); ! free any temporary input strings. 3 179 $STR_FREE_TEMP( .string2 ); 3 180 END; 2 181 2 182 ! 2 183 ! Return the final completion code to the caller. 2 184 ! 2 185 2 186 RETURN .primary_code 2 187 2 188 END; 1 189 END 1 190 ELUDOM STRLSS 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]STRLSS.BLI;1 .psect _XPO$CODE, CON, LCL, SHR, EXE, NOWRT, NOVEC .proc XST$LSS .align 32 .global XST$LSS XST$LSS: // 000083 { .mii 002C01E48EC0 0000 alloc r59 = rspfs, 6, 24, 6, 0 010800100F40 0001 mov r61 = r1 000188000E80 0002 mov r58 = br0 } { .mii 012000002640 0010 mov r25 = 1 // 000142 0000B2100F80 0011 sxt4 r62 = STRING1 // r62 = r33 010800000A00 0012 mov SECONDARY_CODE = r0 ;; // r40 = r0 // 000140 } { .mib 000008000000 0020 nop.m 0 000198000F00 0021 mov r60 = pr // 000083 00A000001000 0022 br.call.sptk.many br0 = XST$VALIDATE // 000142 } { .mib 010803D00040 0030 mov r1 = r61 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 00800003C000 0052 br.sptk.few L$4 ;; } 0060 L$2: // 000143 { .mib 012000002640 0060 mov r25 = 1 0000B2200F80 0061 sxt4 r62 = STRING2 // r62 = r34 00A000001000 0062 br.call.sptk.many br0 = XST$VALIDATE } { .mib 010803D00040 0070 mov r1 = r61 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 008000034000 0092 br.sptk.few L$4 ;; } 00A0 L$5: STRLSS Machine Code Listing 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 6 X00.04 XST$LSS 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRLSS.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 00860001000B 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 } { .mii 000008000000 00F0 nop.m 0 0000923008C0 00F1 zxt4 r35 = FILL // r35 = r35 010802D08B40 00F2 adds r45 = 4, r45 ;; } { .mii 010802C08B00 0100 adds r44 = 4, r44 0100630468C0 0101 and r35 = r35, r48 000008000000 0102 nop.i 0 ;; } { .mmi 00B08ADF8BC0 0110 ld4 r47 = [r45], -4 00B08ACF8B80 0111 ld4 r46 = [r44], -4 010802301080 0112 mov r66 = r35 ;; } { .mmi 008042D01040 0120 ld2 r65 = [r45] 008042C00FC0 0121 ld2 r63 = [r44] 0000B2F01000 0122 sxt4 r64 = r47 } { .mib 000008000000 0130 nop.m 0 0000B2E00F80 0131 sxt4 r62 = r46 00A000001000 0132 br.call.sptk.many br0 = OTS$STRCMP_LSSP } { .mfb 000008000000 0140 nop.m 0 000008000000 0141 nop.f 0 00800001A000 0142 br.sptk.few L$21 ;; } 0150 L$14: // 000149 STRLSS Machine Code Listing 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 7 X00.04 XST$LSS 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRLSS.BLI;1 { .mii 000008000000 0150 nop.m 0 0000B2200C80 0151 sxt4 r50 = STRING2 // r50 = r34 // 000157 0000B2100C40 0152 sxt4 r49 = STRING1 ;; // r49 = r33 } { .mmi 008043200D00 0160 ld2 r52 = [r50] 008043100FC0 0161 ld2 r63 = [r49] 000008000000 0162 nop.i 0 ;; } { .mfb 01843B47E000 0170 cmp4.lt pr0, pr7 = r63, r52 000008000000 0171 nop.f 0 00860000C007 0172 (pr7) br.cond.dpnt.few L$16 } { .mii 010803208D80 0180 adds r54 = 4, r50 // 000159 010803108D40 0181 adds r53 = 4, r49 000008000000 0182 nop.i 0 ;; } { .mmi 008083600C80 0190 ld4 r50 = [r54] 008083500C40 0191 ld4 r49 = [r53] 000008000000 0192 nop.i 0 ;; } { .mii 000008000000 01A0 nop.m 0 0000B3201000 01A1 sxt4 r64 = r50 0000B3100F80 01A2 sxt4 r62 = r49 } { .mfb 000008000000 01B0 nop.m 0 000008000000 01B1 nop.f 0 00A000001000 01B2 br.call.sptk.many br0 = OTS$STRCMP_LEQS } { .mfb 000008000000 01C0 nop.m 0 000008000000 01C1 nop.f 0 00800000A000 01C2 br.sptk.few L$21 ;; } 01D0 L$16: // 000157 { .mii 010803108C40 01D0 adds r49 = 4, r49 010803208C80 01D1 adds r50 = 4, r50 010803400FC0 01D2 mov r63 = r52 ;; // 000161 } { .mmi 008083100C40 01E0 ld4 r49 = [r49] 008083200C80 01E1 ld4 r50 = [r50] 000008000000 01E2 nop.i 0 ;; } { .mii 000008000000 01F0 nop.m 0 0000B3100F80 01F1 sxt4 r62 = r49 0000B3201000 01F2 sxt4 r64 = r50 } { .mfb STRLSS Machine Code Listing 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 8 X00.04 XST$LSS 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRLSS.BLI;1 000008000000 0200 nop.m 0 000008000000 0201 nop.f 0 00A000001000 0202 br.call.sptk.many br0 = OTS$STRCMP_LSSS } 0210 L$21: { .mii 010800000A40 0210 mov PRIMARY_CODE = r0 // r41 = r0 01C010010000 0211 cmp.eq pr0, pr2 = r8, r0 010803D00040 0212 mov r1 = r61 ;; } { .mfi 010800002A42 0220 (pr2) adds PRIMARY_CODE = 1, r0 // r41 = 1, r0 000008000000 0221 nop.f 0 000008000000 0222 nop.i 0 ;; } 0230 L$4: // 000169 { .mii 01C400052180 0230 cmp4.eq pr6, pr0 = PRIMARY_CODE, r0 // pr6, pr0 = r41, r0 00A042900240 0231 tbit.z pr9, pr8 = PRIMARY_CODE, 0 ;; // pr9, pr8 = r41, 0 01C248000206 0232 (pr6) cmp.eq.or.andcm pr8, pr9 = r0, r0 ;; } { .mmi 010802500DC9 0240 (pr9) mov r55 = FAILURE_ACTION ;; // r55 = r37 010802400DC8 0241 (pr8) mov r55 = SUCCESS_ACTION // r55 = r36 000008000000 0242 nop.i 0 ;; } { .mfb 01C4037002C0 0250 cmp4.eq pr11, pr0 = r0, $STR$ACTION // pr11, pr0 = r0, r55 000008000000 0251 nop.f 0 00860001000B 0252 (pr11) br.cond.dpnt.few L$18 } { .mii 01200000C640 0260 mov r25 = 6 0000B2801000 0261 sxt4 r64 = SECONDARY_CODE // r64 = r40 0000B3700DC0 0262 sxt4 r55 = $STR$ACTION // r55 = r55 } { .mii 012000100A00 0270 add r40 = @ltoff(FUNCTION_TEXT), r1 0000B22010C0 0271 sxt4 r67 = STRING2 // r67 = r34 0000B2101080 0272 sxt4 r66 = STRING1 ;; // r66 = r33 } { .mii 0080C2800A00 0280 ld8 r40 = FUNCTION_TEXT // r40 = [r40] 012000002F80 0281 mov r62 = 1 010803710DC0 0282 adds r55 = 8, r55 ;; } { .mii 000008000000 0290 nop.m 0 0000B2900FC0 0291 sxt4 r63 = PRIMARY_CODE // r63 = r41 0000B2801040 0292 sxt4 r65 = r40 } { .mmi 00B0CB7F0040 02A0 ld8 r1 = [r55], -8 ;; 0080C3700DC0 02A1 ld8 r55 = [r55] 000008000000 02A2 nop.i 0 ;; } { .mib STRLSS Machine Code Listing 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 9 X00.04 XST$LSS 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRLSS.BLI;1 000008000000 02B0 nop.m 0 000E0016E180 02B1 mov br6 = r55 00210000C000 02B2 br.call.sptk.few br0 = br6 } { .mii 010800800A40 02C0 mov PRIMARY_CODE = r8 // r41 = r8 010803D00040 02C1 mov r1 = r61 000008000000 02C2 nop.i 0 } 02D0 L$18: { .mii 000008000000 02D0 nop.m 0 00A402038800 02D1 extr.u r32 = OPTIONS, 14, 1 ;; // r32 = r32, 14, 1 // 000175 00A012000180 02D2 tbit.z pr6, pr2 = r32, 0 } { .mfb 000008000000 02E0 nop.m 0 000008000000 02E1 nop.f 0 00860000C002 02E2 (pr2) br.cond.dpnt.few L$19 } { .mib 012000002640 02F0 mov r25 = 1 // 000178 0000B2100F80 02F1 sxt4 r62 = STRING1 // r62 = r33 00A000001000 02F2 br.call.sptk.many br0 = XST$FREE_TEMP ;; } { .mii 012000002640 0300 mov r25 = 1 // 000179 0000B2200F80 0301 sxt4 r62 = STRING2 // r62 = r34 010803D00040 0302 mov r1 = r61 // 000178 } { .mfb 000008000000 0310 nop.m 0 000008000000 0311 nop.f 0 004000000000 0312 nop.b 0 ;; } { .mfb 000008000000 0320 nop.m 0 000008000000 0321 nop.f 0 00A000001000 0322 br.call.sptk.many br0 = XST$FREE_TEMP // 000179 } { .mfi 010803D00040 0330 mov r1 = r61 000008000000 0331 nop.f 0 000008000000 0332 nop.i 0 } 0340 L$19: // 000175 { .mii 000008000000 0340 nop.m 0 0016000787C0 0341 mov pr = r60, -65474 // 000186 0000B2900200 0342 sxt4 r8 = PRIMARY_CODE ;; // r8 = r41 } { .mii 000008000000 0350 nop.m 0 000154076000 0351 mov.i rspfs = r59 000E00174000 0352 mov br0 = r58 ;; } { .mfb STRLSS Machine Code Listing 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 10 X00.04 XST$LSS 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRLSS.BLI;1 000008000000 0360 nop.m 0 000008000000 0361 nop.f 0 000108001100 0362 br.ret.sptk.many br0 ;; } .endp XST$LSS Routine Size: 880 bytes, Routine Base: _XPO$CODE + 0000 .psect _XPO$DATA, CON, LCL, NOSHR, NOEXE, WRT, NOVEC .lcomm FUNCTION_TEXT, 8, 8 .lcomm P.AAA, 11, 16 .psect _XPO$DATA, CON, LCL, NOSHR, NOEXE, WRT, NOVEC FUNCTION_TEXT: 000B 0000 data2 0xB // data2 11 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: 73656C20 0000 string " less than " 68742073 0004 206E61 0008 .section .data .type XST$VALIDATE, @function .global XST$VALIDATE .section .data .type XST$VALIDATE, @function .global XST$VALIDATE .section .data .type OTS$STRCMP_LSSP, @function .global OTS$STRCMP_LSSP .section .data .type OTS$STRCMP_LEQS, @function .global OTS$STRCMP_LEQS .section .data .type OTS$STRCMP_LSSS, @function .global OTS$STRCMP_LSSS .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 11 Source Listing 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRLSS.BLI;1 Source Listing 4-FEB-2004 11:02:05 BLISS-32I T1.1-053 Page 12 Source Listing 19-MAR-2002 10:11:56 [LASTOVICA.XPORT.VMSGEN]STRLSS.BLI;1 COMMAND LINE: BLISSSTRLSS/LIST/DEBUG