.title stcopy ; ; this routine provides the following interface ; ; call stcopy(in, i, out, j) ; ; in is an EOS-terminated string, j is incremented ; out is EOS-terminated ; in=4 i=8 out=12 j=16 .psect st_pure_code rel,con,lcl,exe,nowrt,rd,pic,shr,usr,novec,long .entry stcopy ^m addl3 in(ap),@i(ap),r0 decl r0 ; address of in(i) movl j(ap),r2 ; address of j decl (r2) ; back j up one addl3 out(ap),(r2),r1 ; address of out(j) 10$: incl (r2) ; increment j movb (r0)+,(r1)+ ; copy character bneq 10$ ; if != 0, do next one ret .end