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

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