annotate src/zlib-1.2.8/contrib/masmx86/match686.asm @ 54:5f67a29f0fc7

Rebuild MAD with 64-bit FPM
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 30 Nov 2016 20:59:17 +0000
parents 5ea0608b923f
children
rev   line source
Chris@43 1 ; match686.asm -- Asm portion of the optimized longest_match for 32 bits x86
Chris@43 2 ; Copyright (C) 1995-1996 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
Chris@43 3 ; File written by Gilles Vollant, by converting match686.S from Brian Raiter
Chris@43 4 ; for MASM. This is as assembly version of longest_match
Chris@43 5 ; from Jean-loup Gailly in deflate.c
Chris@43 6 ;
Chris@43 7 ; http://www.zlib.net
Chris@43 8 ; http://www.winimage.com/zLibDll
Chris@43 9 ; http://www.muppetlabs.com/~breadbox/software/assembly.html
Chris@43 10 ;
Chris@43 11 ; For Visual C++ 4.x and higher and ML 6.x and higher
Chris@43 12 ; ml.exe is distributed in
Chris@43 13 ; http://www.microsoft.com/downloads/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
Chris@43 14 ;
Chris@43 15 ; this file contain two implementation of longest_match
Chris@43 16 ;
Chris@43 17 ; this longest_match was written by Brian raiter (1998), optimized for Pentium Pro
Chris@43 18 ; (and the faster known version of match_init on modern Core 2 Duo and AMD Phenom)
Chris@43 19 ;
Chris@43 20 ; for using an assembly version of longest_match, you need define ASMV in project
Chris@43 21 ;
Chris@43 22 ; compile the asm file running
Chris@43 23 ; ml /coff /Zi /c /Flmatch686.lst match686.asm
Chris@43 24 ; and do not include match686.obj in your project
Chris@43 25 ;
Chris@43 26 ; note: contrib of zLib 1.2.3 and earlier contained both a deprecated version for
Chris@43 27 ; Pentium (prior Pentium Pro) and this version for Pentium Pro and modern processor
Chris@43 28 ; with autoselect (with cpu detection code)
Chris@43 29 ; if you want support the old pentium optimization, you can still use these version
Chris@43 30 ;
Chris@43 31 ; this file is not optimized for old pentium, but it compatible with all x86 32 bits
Chris@43 32 ; processor (starting 80386)
Chris@43 33 ;
Chris@43 34 ;
Chris@43 35 ; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2
Chris@43 36
Chris@43 37 ;uInt longest_match(s, cur_match)
Chris@43 38 ; deflate_state *s;
Chris@43 39 ; IPos cur_match; /* current match */
Chris@43 40
Chris@43 41 NbStack equ 76
Chris@43 42 cur_match equ dword ptr[esp+NbStack-0]
Chris@43 43 str_s equ dword ptr[esp+NbStack-4]
Chris@43 44 ; 5 dword on top (ret,ebp,esi,edi,ebx)
Chris@43 45 adrret equ dword ptr[esp+NbStack-8]
Chris@43 46 pushebp equ dword ptr[esp+NbStack-12]
Chris@43 47 pushedi equ dword ptr[esp+NbStack-16]
Chris@43 48 pushesi equ dword ptr[esp+NbStack-20]
Chris@43 49 pushebx equ dword ptr[esp+NbStack-24]
Chris@43 50
Chris@43 51 chain_length equ dword ptr [esp+NbStack-28]
Chris@43 52 limit equ dword ptr [esp+NbStack-32]
Chris@43 53 best_len equ dword ptr [esp+NbStack-36]
Chris@43 54 window equ dword ptr [esp+NbStack-40]
Chris@43 55 prev equ dword ptr [esp+NbStack-44]
Chris@43 56 scan_start equ word ptr [esp+NbStack-48]
Chris@43 57 wmask equ dword ptr [esp+NbStack-52]
Chris@43 58 match_start_ptr equ dword ptr [esp+NbStack-56]
Chris@43 59 nice_match equ dword ptr [esp+NbStack-60]
Chris@43 60 scan equ dword ptr [esp+NbStack-64]
Chris@43 61
Chris@43 62 windowlen equ dword ptr [esp+NbStack-68]
Chris@43 63 match_start equ dword ptr [esp+NbStack-72]
Chris@43 64 strend equ dword ptr [esp+NbStack-76]
Chris@43 65 NbStackAdd equ (NbStack-24)
Chris@43 66
Chris@43 67 .386p
Chris@43 68
Chris@43 69 name gvmatch
Chris@43 70 .MODEL FLAT
Chris@43 71
Chris@43 72
Chris@43 73
Chris@43 74 ; all the +zlib1222add offsets are due to the addition of fields
Chris@43 75 ; in zlib in the deflate_state structure since the asm code was first written
Chris@43 76 ; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
Chris@43 77 ; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
Chris@43 78 ; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
Chris@43 79
Chris@43 80 zlib1222add equ 8
Chris@43 81
Chris@43 82 ; Note : these value are good with a 8 bytes boundary pack structure
Chris@43 83 dep_chain_length equ 74h+zlib1222add
Chris@43 84 dep_window equ 30h+zlib1222add
Chris@43 85 dep_strstart equ 64h+zlib1222add
Chris@43 86 dep_prev_length equ 70h+zlib1222add
Chris@43 87 dep_nice_match equ 88h+zlib1222add
Chris@43 88 dep_w_size equ 24h+zlib1222add
Chris@43 89 dep_prev equ 38h+zlib1222add
Chris@43 90 dep_w_mask equ 2ch+zlib1222add
Chris@43 91 dep_good_match equ 84h+zlib1222add
Chris@43 92 dep_match_start equ 68h+zlib1222add
Chris@43 93 dep_lookahead equ 6ch+zlib1222add
Chris@43 94
Chris@43 95
Chris@43 96 _TEXT segment
Chris@43 97
Chris@43 98 IFDEF NOUNDERLINE
Chris@43 99 public longest_match
Chris@43 100 public match_init
Chris@43 101 ELSE
Chris@43 102 public _longest_match
Chris@43 103 public _match_init
Chris@43 104 ENDIF
Chris@43 105
Chris@43 106 MAX_MATCH equ 258
Chris@43 107 MIN_MATCH equ 3
Chris@43 108 MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1)
Chris@43 109
Chris@43 110
Chris@43 111
Chris@43 112 MAX_MATCH equ 258
Chris@43 113 MIN_MATCH equ 3
Chris@43 114 MIN_LOOKAHEAD equ (MAX_MATCH + MIN_MATCH + 1)
Chris@43 115 MAX_MATCH_8_ equ ((MAX_MATCH + 7) AND 0FFF0h)
Chris@43 116
Chris@43 117
Chris@43 118 ;;; stack frame offsets
Chris@43 119
Chris@43 120 chainlenwmask equ esp + 0 ; high word: current chain len
Chris@43 121 ; low word: s->wmask
Chris@43 122 window equ esp + 4 ; local copy of s->window
Chris@43 123 windowbestlen equ esp + 8 ; s->window + bestlen
Chris@43 124 scanstart equ esp + 16 ; first two bytes of string
Chris@43 125 scanend equ esp + 12 ; last two bytes of string
Chris@43 126 scanalign equ esp + 20 ; dword-misalignment of string
Chris@43 127 nicematch equ esp + 24 ; a good enough match size
Chris@43 128 bestlen equ esp + 28 ; size of best match so far
Chris@43 129 scan equ esp + 32 ; ptr to string wanting match
Chris@43 130
Chris@43 131 LocalVarsSize equ 36
Chris@43 132 ; saved ebx byte esp + 36
Chris@43 133 ; saved edi byte esp + 40
Chris@43 134 ; saved esi byte esp + 44
Chris@43 135 ; saved ebp byte esp + 48
Chris@43 136 ; return address byte esp + 52
Chris@43 137 deflatestate equ esp + 56 ; the function arguments
Chris@43 138 curmatch equ esp + 60
Chris@43 139
Chris@43 140 ;;; Offsets for fields in the deflate_state structure. These numbers
Chris@43 141 ;;; are calculated from the definition of deflate_state, with the
Chris@43 142 ;;; assumption that the compiler will dword-align the fields. (Thus,
Chris@43 143 ;;; changing the definition of deflate_state could easily cause this
Chris@43 144 ;;; program to crash horribly, without so much as a warning at
Chris@43 145 ;;; compile time. Sigh.)
Chris@43 146
Chris@43 147 dsWSize equ 36+zlib1222add
Chris@43 148 dsWMask equ 44+zlib1222add
Chris@43 149 dsWindow equ 48+zlib1222add
Chris@43 150 dsPrev equ 56+zlib1222add
Chris@43 151 dsMatchLen equ 88+zlib1222add
Chris@43 152 dsPrevMatch equ 92+zlib1222add
Chris@43 153 dsStrStart equ 100+zlib1222add
Chris@43 154 dsMatchStart equ 104+zlib1222add
Chris@43 155 dsLookahead equ 108+zlib1222add
Chris@43 156 dsPrevLen equ 112+zlib1222add
Chris@43 157 dsMaxChainLen equ 116+zlib1222add
Chris@43 158 dsGoodMatch equ 132+zlib1222add
Chris@43 159 dsNiceMatch equ 136+zlib1222add
Chris@43 160
Chris@43 161
Chris@43 162 ;;; match686.asm -- Pentium-Pro-optimized version of longest_match()
Chris@43 163 ;;; Written for zlib 1.1.2
Chris@43 164 ;;; Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
Chris@43 165 ;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html
Chris@43 166 ;;;
Chris@43 167 ;;
Chris@43 168 ;; This software is provided 'as-is', without any express or implied
Chris@43 169 ;; warranty. In no event will the authors be held liable for any damages
Chris@43 170 ;; arising from the use of this software.
Chris@43 171 ;;
Chris@43 172 ;; Permission is granted to anyone to use this software for any purpose,
Chris@43 173 ;; including commercial applications, and to alter it and redistribute it
Chris@43 174 ;; freely, subject to the following restrictions:
Chris@43 175 ;;
Chris@43 176 ;; 1. The origin of this software must not be misrepresented; you must not
Chris@43 177 ;; claim that you wrote the original software. If you use this software
Chris@43 178 ;; in a product, an acknowledgment in the product documentation would be
Chris@43 179 ;; appreciated but is not required.
Chris@43 180 ;; 2. Altered source versions must be plainly marked as such, and must not be
Chris@43 181 ;; misrepresented as being the original software
Chris@43 182 ;; 3. This notice may not be removed or altered from any source distribution.
Chris@43 183 ;;
Chris@43 184
Chris@43 185 ;GLOBAL _longest_match, _match_init
Chris@43 186
Chris@43 187
Chris@43 188 ;SECTION .text
Chris@43 189
Chris@43 190 ;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
Chris@43 191
Chris@43 192 ;_longest_match:
Chris@43 193 IFDEF NOUNDERLINE
Chris@43 194 longest_match proc near
Chris@43 195 ELSE
Chris@43 196 _longest_match proc near
Chris@43 197 ENDIF
Chris@43 198 .FPO (9, 4, 0, 0, 1, 0)
Chris@43 199
Chris@43 200 ;;; Save registers that the compiler may be using, and adjust esp to
Chris@43 201 ;;; make room for our stack frame.
Chris@43 202
Chris@43 203 push ebp
Chris@43 204 push edi
Chris@43 205 push esi
Chris@43 206 push ebx
Chris@43 207 sub esp, LocalVarsSize
Chris@43 208
Chris@43 209 ;;; Retrieve the function arguments. ecx will hold cur_match
Chris@43 210 ;;; throughout the entire function. edx will hold the pointer to the
Chris@43 211 ;;; deflate_state structure during the function's setup (before
Chris@43 212 ;;; entering the main loop.
Chris@43 213
Chris@43 214 mov edx, [deflatestate]
Chris@43 215 mov ecx, [curmatch]
Chris@43 216
Chris@43 217 ;;; uInt wmask = s->w_mask;
Chris@43 218 ;;; unsigned chain_length = s->max_chain_length;
Chris@43 219 ;;; if (s->prev_length >= s->good_match) {
Chris@43 220 ;;; chain_length >>= 2;
Chris@43 221 ;;; }
Chris@43 222
Chris@43 223 mov eax, [edx + dsPrevLen]
Chris@43 224 mov ebx, [edx + dsGoodMatch]
Chris@43 225 cmp eax, ebx
Chris@43 226 mov eax, [edx + dsWMask]
Chris@43 227 mov ebx, [edx + dsMaxChainLen]
Chris@43 228 jl LastMatchGood
Chris@43 229 shr ebx, 2
Chris@43 230 LastMatchGood:
Chris@43 231
Chris@43 232 ;;; chainlen is decremented once beforehand so that the function can
Chris@43 233 ;;; use the sign flag instead of the zero flag for the exit test.
Chris@43 234 ;;; It is then shifted into the high word, to make room for the wmask
Chris@43 235 ;;; value, which it will always accompany.
Chris@43 236
Chris@43 237 dec ebx
Chris@43 238 shl ebx, 16
Chris@43 239 or ebx, eax
Chris@43 240 mov [chainlenwmask], ebx
Chris@43 241
Chris@43 242 ;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
Chris@43 243
Chris@43 244 mov eax, [edx + dsNiceMatch]
Chris@43 245 mov ebx, [edx + dsLookahead]
Chris@43 246 cmp ebx, eax
Chris@43 247 jl LookaheadLess
Chris@43 248 mov ebx, eax
Chris@43 249 LookaheadLess: mov [nicematch], ebx
Chris@43 250
Chris@43 251 ;;; register Bytef *scan = s->window + s->strstart;
Chris@43 252
Chris@43 253 mov esi, [edx + dsWindow]
Chris@43 254 mov [window], esi
Chris@43 255 mov ebp, [edx + dsStrStart]
Chris@43 256 lea edi, [esi + ebp]
Chris@43 257 mov [scan], edi
Chris@43 258
Chris@43 259 ;;; Determine how many bytes the scan ptr is off from being
Chris@43 260 ;;; dword-aligned.
Chris@43 261
Chris@43 262 mov eax, edi
Chris@43 263 neg eax
Chris@43 264 and eax, 3
Chris@43 265 mov [scanalign], eax
Chris@43 266
Chris@43 267 ;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
Chris@43 268 ;;; s->strstart - (IPos)MAX_DIST(s) : NIL;
Chris@43 269
Chris@43 270 mov eax, [edx + dsWSize]
Chris@43 271 sub eax, MIN_LOOKAHEAD
Chris@43 272 sub ebp, eax
Chris@43 273 jg LimitPositive
Chris@43 274 xor ebp, ebp
Chris@43 275 LimitPositive:
Chris@43 276
Chris@43 277 ;;; int best_len = s->prev_length;
Chris@43 278
Chris@43 279 mov eax, [edx + dsPrevLen]
Chris@43 280 mov [bestlen], eax
Chris@43 281
Chris@43 282 ;;; Store the sum of s->window + best_len in esi locally, and in esi.
Chris@43 283
Chris@43 284 add esi, eax
Chris@43 285 mov [windowbestlen], esi
Chris@43 286
Chris@43 287 ;;; register ush scan_start = *(ushf*)scan;
Chris@43 288 ;;; register ush scan_end = *(ushf*)(scan+best_len-1);
Chris@43 289 ;;; Posf *prev = s->prev;
Chris@43 290
Chris@43 291 movzx ebx, word ptr [edi]
Chris@43 292 mov [scanstart], ebx
Chris@43 293 movzx ebx, word ptr [edi + eax - 1]
Chris@43 294 mov [scanend], ebx
Chris@43 295 mov edi, [edx + dsPrev]
Chris@43 296
Chris@43 297 ;;; Jump into the main loop.
Chris@43 298
Chris@43 299 mov edx, [chainlenwmask]
Chris@43 300 jmp short LoopEntry
Chris@43 301
Chris@43 302 align 4
Chris@43 303
Chris@43 304 ;;; do {
Chris@43 305 ;;; match = s->window + cur_match;
Chris@43 306 ;;; if (*(ushf*)(match+best_len-1) != scan_end ||
Chris@43 307 ;;; *(ushf*)match != scan_start) continue;
Chris@43 308 ;;; [...]
Chris@43 309 ;;; } while ((cur_match = prev[cur_match & wmask]) > limit
Chris@43 310 ;;; && --chain_length != 0);
Chris@43 311 ;;;
Chris@43 312 ;;; Here is the inner loop of the function. The function will spend the
Chris@43 313 ;;; majority of its time in this loop, and majority of that time will
Chris@43 314 ;;; be spent in the first ten instructions.
Chris@43 315 ;;;
Chris@43 316 ;;; Within this loop:
Chris@43 317 ;;; ebx = scanend
Chris@43 318 ;;; ecx = curmatch
Chris@43 319 ;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
Chris@43 320 ;;; esi = windowbestlen - i.e., (window + bestlen)
Chris@43 321 ;;; edi = prev
Chris@43 322 ;;; ebp = limit
Chris@43 323
Chris@43 324 LookupLoop:
Chris@43 325 and ecx, edx
Chris@43 326 movzx ecx, word ptr [edi + ecx*2]
Chris@43 327 cmp ecx, ebp
Chris@43 328 jbe LeaveNow
Chris@43 329 sub edx, 00010000h
Chris@43 330 js LeaveNow
Chris@43 331 LoopEntry: movzx eax, word ptr [esi + ecx - 1]
Chris@43 332 cmp eax, ebx
Chris@43 333 jnz LookupLoop
Chris@43 334 mov eax, [window]
Chris@43 335 movzx eax, word ptr [eax + ecx]
Chris@43 336 cmp eax, [scanstart]
Chris@43 337 jnz LookupLoop
Chris@43 338
Chris@43 339 ;;; Store the current value of chainlen.
Chris@43 340
Chris@43 341 mov [chainlenwmask], edx
Chris@43 342
Chris@43 343 ;;; Point edi to the string under scrutiny, and esi to the string we
Chris@43 344 ;;; are hoping to match it up with. In actuality, esi and edi are
Chris@43 345 ;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
Chris@43 346 ;;; initialized to -(MAX_MATCH_8 - scanalign).
Chris@43 347
Chris@43 348 mov esi, [window]
Chris@43 349 mov edi, [scan]
Chris@43 350 add esi, ecx
Chris@43 351 mov eax, [scanalign]
Chris@43 352 mov edx, 0fffffef8h; -(MAX_MATCH_8)
Chris@43 353 lea edi, [edi + eax + 0108h] ;MAX_MATCH_8]
Chris@43 354 lea esi, [esi + eax + 0108h] ;MAX_MATCH_8]
Chris@43 355
Chris@43 356 ;;; Test the strings for equality, 8 bytes at a time. At the end,
Chris@43 357 ;;; adjust edx so that it is offset to the exact byte that mismatched.
Chris@43 358 ;;;
Chris@43 359 ;;; We already know at this point that the first three bytes of the
Chris@43 360 ;;; strings match each other, and they can be safely passed over before
Chris@43 361 ;;; starting the compare loop. So what this code does is skip over 0-3
Chris@43 362 ;;; bytes, as much as necessary in order to dword-align the edi
Chris@43 363 ;;; pointer. (esi will still be misaligned three times out of four.)
Chris@43 364 ;;;
Chris@43 365 ;;; It should be confessed that this loop usually does not represent
Chris@43 366 ;;; much of the total running time. Replacing it with a more
Chris@43 367 ;;; straightforward "rep cmpsb" would not drastically degrade
Chris@43 368 ;;; performance.
Chris@43 369
Chris@43 370 LoopCmps:
Chris@43 371 mov eax, [esi + edx]
Chris@43 372 xor eax, [edi + edx]
Chris@43 373 jnz LeaveLoopCmps
Chris@43 374 mov eax, [esi + edx + 4]
Chris@43 375 xor eax, [edi + edx + 4]
Chris@43 376 jnz LeaveLoopCmps4
Chris@43 377 add edx, 8
Chris@43 378 jnz LoopCmps
Chris@43 379 jmp short LenMaximum
Chris@43 380 LeaveLoopCmps4: add edx, 4
Chris@43 381 LeaveLoopCmps: test eax, 0000FFFFh
Chris@43 382 jnz LenLower
Chris@43 383 add edx, 2
Chris@43 384 shr eax, 16
Chris@43 385 LenLower: sub al, 1
Chris@43 386 adc edx, 0
Chris@43 387
Chris@43 388 ;;; Calculate the length of the match. If it is longer than MAX_MATCH,
Chris@43 389 ;;; then automatically accept it as the best possible match and leave.
Chris@43 390
Chris@43 391 lea eax, [edi + edx]
Chris@43 392 mov edi, [scan]
Chris@43 393 sub eax, edi
Chris@43 394 cmp eax, MAX_MATCH
Chris@43 395 jge LenMaximum
Chris@43 396
Chris@43 397 ;;; If the length of the match is not longer than the best match we
Chris@43 398 ;;; have so far, then forget it and return to the lookup loop.
Chris@43 399
Chris@43 400 mov edx, [deflatestate]
Chris@43 401 mov ebx, [bestlen]
Chris@43 402 cmp eax, ebx
Chris@43 403 jg LongerMatch
Chris@43 404 mov esi, [windowbestlen]
Chris@43 405 mov edi, [edx + dsPrev]
Chris@43 406 mov ebx, [scanend]
Chris@43 407 mov edx, [chainlenwmask]
Chris@43 408 jmp LookupLoop
Chris@43 409
Chris@43 410 ;;; s->match_start = cur_match;
Chris@43 411 ;;; best_len = len;
Chris@43 412 ;;; if (len >= nice_match) break;
Chris@43 413 ;;; scan_end = *(ushf*)(scan+best_len-1);
Chris@43 414
Chris@43 415 LongerMatch: mov ebx, [nicematch]
Chris@43 416 mov [bestlen], eax
Chris@43 417 mov [edx + dsMatchStart], ecx
Chris@43 418 cmp eax, ebx
Chris@43 419 jge LeaveNow
Chris@43 420 mov esi, [window]
Chris@43 421 add esi, eax
Chris@43 422 mov [windowbestlen], esi
Chris@43 423 movzx ebx, word ptr [edi + eax - 1]
Chris@43 424 mov edi, [edx + dsPrev]
Chris@43 425 mov [scanend], ebx
Chris@43 426 mov edx, [chainlenwmask]
Chris@43 427 jmp LookupLoop
Chris@43 428
Chris@43 429 ;;; Accept the current string, with the maximum possible length.
Chris@43 430
Chris@43 431 LenMaximum: mov edx, [deflatestate]
Chris@43 432 mov dword ptr [bestlen], MAX_MATCH
Chris@43 433 mov [edx + dsMatchStart], ecx
Chris@43 434
Chris@43 435 ;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
Chris@43 436 ;;; return s->lookahead;
Chris@43 437
Chris@43 438 LeaveNow:
Chris@43 439 mov edx, [deflatestate]
Chris@43 440 mov ebx, [bestlen]
Chris@43 441 mov eax, [edx + dsLookahead]
Chris@43 442 cmp ebx, eax
Chris@43 443 jg LookaheadRet
Chris@43 444 mov eax, ebx
Chris@43 445 LookaheadRet:
Chris@43 446
Chris@43 447 ;;; Restore the stack and return from whence we came.
Chris@43 448
Chris@43 449 add esp, LocalVarsSize
Chris@43 450 pop ebx
Chris@43 451 pop esi
Chris@43 452 pop edi
Chris@43 453 pop ebp
Chris@43 454
Chris@43 455 ret
Chris@43 456 ; please don't remove this string !
Chris@43 457 ; Your can freely use match686 in any free or commercial app if you don't remove the string in the binary!
Chris@43 458 db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah
Chris@43 459
Chris@43 460
Chris@43 461 IFDEF NOUNDERLINE
Chris@43 462 longest_match endp
Chris@43 463 ELSE
Chris@43 464 _longest_match endp
Chris@43 465 ENDIF
Chris@43 466
Chris@43 467 IFDEF NOUNDERLINE
Chris@43 468 match_init proc near
Chris@43 469 ret
Chris@43 470 match_init endp
Chris@43 471 ELSE
Chris@43 472 _match_init proc near
Chris@43 473 ret
Chris@43 474 _match_init endp
Chris@43 475 ENDIF
Chris@43 476
Chris@43 477
Chris@43 478 _TEXT ends
Chris@43 479 end