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

  1. ;bsame.asm - contains i86_bsame()
  2.  
  3.     dosseg
  4.     .model    large
  5.     .code
  6.  
  7.     PUBLIC _i86_bsame
  8.     ;i86_bsame(d, count)
  9.     ;find out how many bytes in a row are the same value 
  10. _i86_bsame PROC far
  11.     push bp
  12.     mov bp,sp
  13.     push di
  14.     cld
  15.  
  16.     les di,[bp+4+2]
  17.     mov cx,[bp+8+2]
  18.     mov ax,es:[di]
  19.     inc cx
  20.     repe scasb
  21.  
  22.     mov ax,[bp+8+2]
  23.     sub ax,cx
  24.  
  25.     pop di
  26.     pop    bp
  27.     ret    
  28. _i86_bsame ENDP
  29.  
  30. END
  31.