*------------------------------------------------------------------------------ * NAME STR_APPEND *------------------------------------------------------------------------------ * DEPENDENCY STR_COPY * PURPOSE Append the string at (A2) to the end of the string at (A1). * DESCRIPTION Copies the string whose address is passed in A2 to the end of * the string whose address is passed in A1. The old contents of * both strings will be preserved - except A1 which will be * extended of course ! * INPUTS : * A1.L = Address of the receiving string * A2.L = Address of the sending string * OUTPUTS : * A1.L = Address of the receiving string (preserved) * A2.L = Address of the sending string (Preserved) *------------------------------------------------------------------------------ str_append movem.l d0/a1-a2,-(a7) ; Save the working register move.w (a2)+,d0 ; Size of 'from' string move.w (a1),d1 ; Size of 'to' string add.w d0,(a1)+ ; New size of 'to' string adda.w d1,a1 ; New 'to' string end position bra.s sc_next ; Copy all bytes over using STR_COPY ; D0 will be restored after STR_COPY exits ; STR_APPEND exits via STR_COPY.