home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / asmutil / stdlib.zip / MEMBER.ASM < prev    next >
Assembly Source File  |  1990-07-21  |  607b  |  36 lines

  1. stdlib        segment    para public 'slcode'
  2.         assume    cs:stdlib
  3. ;
  4. ;
  5. ; Member-    Checks to see if a character is in a set.
  6. ;
  7. ; inputs:
  8. ;
  9. ;    ES:DI-  Points at the set (at its mask byte).
  10. ;    AL-    Character to check.
  11. ;
  12. ; outputs:
  13. ;    zero flag is set if the character is not in the set.
  14. ;    zero flag is clear if the character is in the set.
  15. ;
  16. ;
  17.         public    sl_member
  18. ;
  19. sl_member    proc    far
  20.         push    ax
  21.         push    bx
  22. ;
  23.         mov    bl, al
  24.                 mov    bh, 0
  25.         mov    al, es:[di]        ;Get mask byte
  26.         test    al, es:8[di][bx]    ;See if char is in set.
  27. ;
  28.         pop    bx
  29.         pop    ax
  30.         ret
  31. sl_member    endp
  32. ;
  33. ;
  34. stdlib        ends
  35.         end
  36.