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

  1.     page    66,132
  2. ;******************************* COMPAR3.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. .list
  12. comment 
  13. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( COMPARE )
  14. ;COMPARE3 - compare strings -cx- long, use case, update registers
  15. ;
  16. ; inputs:   DS:[SI] = address of string1
  17. ;           ES:[DI] = address of string2
  18. ;               CX  = length of compare
  19. ; output:   if match  - si & di point at end of strings
  20. ;                     - cx = zero
  21. ;                     - flags are in "je" state
  22. ;           if different - si & di point one byte past the mismatch.
  23. ;                        - cx = number of bytes remaining to compare
  24. ;                        - flags are in "jne" state
  25. ;
  26. ;* * * * * * * * * * * * * *
  27. 
  28.     PUBLIC    COMPARE3
  29. COMPARE3    PROC    FAR
  30.     cld
  31.     repe    cmpsb
  32.     retf
  33. COMPARE3    ENDP
  34. ;------------------------------------------------------------------------
  35.  
  36. LIBSEG    ENDS
  37.     end
  38.