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

  1. stdlib        segment    para public 'slcode'
  2.         assume    cs:stdlib
  3. ;
  4. ;
  5. ; AddStrl-    Unions into a set the characters in the string immediately
  6. ;        following the CALL.
  7. ;
  8. ; inputs:
  9. ;
  10. ;    ES:DI-  Points at the set (at its mask byte).
  11. ;
  12. ;
  13. ;
  14.         public    sl_AddStrl
  15. ;
  16. sl_AddStrl    proc    far
  17.         push    bp
  18.         mov    bp, sp
  19.         push    ds
  20.         push    es
  21.         push    ax
  22.         push    bx
  23.         push    cx
  24.         push    si
  25.                 push    di
  26. ;
  27.         mov    si, di
  28.         mov    ax, es
  29.         mov    ds, ax
  30.         les    di, 2[bp]
  31.         mov    al, 0
  32.         mov    cx, 0ffffh
  33.     repne    scasb
  34.         xchg    2[bp], di
  35. ;
  36.         mov    al, [si]        ;Get mask byte
  37.         add    si, 8            ;Skip to start of set
  38.         mov    bh, 0
  39.                 jmp    IntoLp
  40. BldLp:        or    [si][bx], al        ;Add to set
  41.         inc    di            ;Move on to next char.
  42. IntoLp:        mov    bl, es:[di]
  43.         cmp    bl, 0
  44.         jnz    BldLp
  45. ;
  46.         pop    di
  47.         pop    si
  48.         pop    cx
  49.         pop    bx
  50.         pop    ax
  51.         pop    es
  52.         pop    ds
  53.         pop    bp
  54.         ret
  55. sl_AddStrl    endp
  56. ;
  57. ;
  58. stdlib        ends
  59.         end
  60.