home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / ASM / ALIB30B / COMPAR5.ASM < prev    next >
Assembly Source File  |  1994-10-27  |  1KB  |  38 lines

  1.     page    66,132
  2. ;******************************* COMPAR5.ASM ********************************
  3.  
  4. LIBSEG           segment byte public "LIB"
  5.         assume cs:LIBSEG , ds:nothing
  6.  
  7. ;----------------------------------------------------------------------------
  8. .xlist
  9.     include  mac.inc
  10.     include  common.inc
  11.     extrn    compare_strings:near
  12. .list
  13. comment 
  14. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( COMPARE )
  15. ;COMPARE5 - compare asciiz strings, either case, update registers
  16. ;
  17. ; inputs:   DS:[SI] = address of string1, must end with a zero char.
  18. ;           ES:[DI] = address of string2
  19. ; output:   if match  - si & di point at end of strings
  20. ;                     - flags are in "je" state
  21. ;           if different - si & di point one byte past the mismatch.
  22. ;                        - flags are in "jne" state
  23. ;* * * * * * * * * * * * * *
  24. 
  25.     PUBLIC    COMPARE5
  26. COMPARE5    PROC    FAR
  27.     apush    ax,cx
  28.     mov    cx,-1
  29.     call    compare_strings
  30.     apop    cx,ax
  31.     retf
  32. COMPARE5    ENDP
  33. ;------------------------------------------------------------------------
  34.  
  35. LIBSEG    ENDS
  36.     end
  37.