.title concat ; ; this routine implements the following interface ; ; call concat(a, b, c) ; ; a and b are EOS-terminated strings. a and b will be concatenated ; into c. a and c may be the same variable. ; a=4 b=8 c=12 .psect st_pure_code rel,con,lcl,exe,nowrt,rd,pic,shr,usr,novec,long .entry concat ^m<> movl a(ap),r0 ; source address movl c(ap),r1 ; destination address 10$: movb (r0)+,(r1)+ ; copy character bneq 10$ ; until EOS tstb -(r1) ; went one too far movl b(ap),r0 ; source address 20$: movb (r0)+,(r1)+ ; copy character bneq 20$ ; until EOS ret .end