home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / lan / driver6s / multifil.asm < prev    next >
Assembly Source File  |  1990-03-06  |  654b  |  26 lines

  1.     extrn    multicast_count: word
  2.     extrn    multicast_broad: byte
  3.  
  4. multicast_filter:
  5. ;enter with es:di -> packet destination address.
  6. ;exit with nc if we should receive it, cy if not.
  7.     test    byte ptr es:[di],1    ;is this a multicast address?
  8.     je    multicast_filter_ok    ;no - must be okay to receive.
  9.  
  10.     mov    si,offset multicast_broad
  11.     mov    dx,multicast_count
  12.     inc    dx            ;include the broadcast address.
  13.  
  14. multicast_filter_1:
  15.     mov    cx,EADDR_LEN/2        ;compare one address.
  16.     repe    cmpsw
  17.     je    multicast_filter_ok    ;They match - ok to receive.
  18.     add    di,cx            ;bump di to the next address.
  19.     dec    dx
  20.     jne    multicast_filter_1
  21.     stc
  22.     ret
  23. multicast_filter_ok:
  24.     clc
  25.     ret
  26.