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

  1.     page    66,132
  2. ;******************************* COMPAR2.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    strlen1:far
  12. .list
  13. comment 
  14. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( COMPARE )
  15. ;COMPARE2 - compare asciiz strings, use case, registers unchanged.
  16. ;
  17. ; inputs:   DS:[SI] = address of string1, must end with zero char.
  18. ;           ES:[DI] = address of string2
  19. ; output:   if match     - flags are in "je" state
  20. ;           if different - flags are in "jne" state
  21. ;* * * * * * * * * * * * * *
  22. 
  23.     PUBLIC    COMPARE2
  24. COMPARE2    PROC    FAR
  25.     cld
  26.     apush    cx,si,di
  27.     call    strlen1            ;find length of string1
  28.     repe    cmpsb
  29.     apop    di,si,cx
  30.     retf
  31. COMPARE2    ENDP
  32. ;------------------------------------------------------------------------
  33.  
  34. LIBSEG    ENDS
  35.     end
  36.