home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c010 / 1.ddi / FLILIB3.ZIP / FLISRC3.ZIP / BCOMPARE.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-08-29  |  512 b   |  37 lines

  1. ;bcompare.asm - contains i86_bcompare()
  2. ;
  3.  
  4.     dosseg
  5.     .model    large
  6.     .code
  7.  
  8.     PUBLIC _i86_bcompare
  9.     ;i86_bcompare(s1,s2,count)
  10. ;return # of bytes of s1 and s2 that match
  11. _i86_bcompare PROC far
  12.     push bp
  13.     mov bp,sp
  14.     push ds
  15.     push si
  16.     push di
  17.     cld
  18.  
  19.     lds si,[bp+4+2]
  20.     les di,[bp+8+2]
  21.     mov cx,[bp+12+2]
  22.     inc cx
  23.     repe cmpsb
  24.  
  25.     mov ax,[bp+12+2]
  26.     sub ax,cx
  27.  
  28.     pop di
  29.     pop si
  30.     pop ds
  31.     pop    bp
  32.     ret    
  33.  
  34. _i86_bcompare ENDP
  35.  
  36. END
  37.