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

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