home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 4 / AACD04.ISO / AACD / Programming / powerd / lib / PowerD / StrAdd.ass < prev    next >
Encoding:
Text File  |  1999-09-21  |  326 b   |  19 lines

  1. ; (4,a7)  - dest str
  2. ; (8,a7)  - src str
  3. ; (12,a7) - length=-1
  4.  
  5.     xdef    _StrAdd
  6.  
  7. _StrAdd    move.l    (4,a7),a0
  8.     move.l    (8,a7),a1
  9.     move.l    (12,a7),d0
  10. .find    tst.b    (a0)+        ; find end
  11.     bne.s    .find
  12.     subq.l    #1,a0        ; jump on zero byte
  13. .loop    move.b    (a1)+,(a0)+    ; add str
  14.     beq.s    .finish
  15.     dbf.s    d0,.loop
  16.     clr.b    (-1,a0)
  17. .finish    move.l    a0,d0
  18.     rts
  19.