.title stcopy ; ; this routine provides the following fortran interface ; ; call stcopy(in, i, out, j) ; ; where in is an EOS-terminated string; j is incremented, also ; ap=%5 in=2 i=4 out=6 j=10 stcopy:: mov in(ap),r0 ; address of in(1) in r0 mov @i(ap),r1 ; value of i in r1 dec r1 ; now value of i-1 add r1,r0 ; r0 now has address of in(i) mov out(ap),r1 ; address of out(1) in r1 mov j(ap),r2 ; address of j in r2 dec (r2) ; j has been decremented add (r2),r1 ; r1 now has address of out(j) 10$: inc (r2) ; j now points to location copied to movb (r0)+,(r1)+ ; copy next byte bne 10$ ; if != 0, then do next byte return .end