.title concat Concatenate strings .ident /000002/ ; 06-Mar-80 ; ;+ ; ; Index Concatenate strings ; ; Usage ; ; char * ; concat(out, in0, in1, ..., inN, 0); ; char *out; ; char *in0, in1, ... inN; ; ; Description ; ; Concat concatenates the argument strings. It returns a ; pointer to the first byte of out. ; ; Bugs ; ;- ; Edit history: ; 000002 06-Mar-80 MM Updated for new calling sequence ; .psect c$code concat:: jsr r5,csv$ mov C$PMTR+0(r5),r0 mov r5,r1 add #C$PMTR+2,r1 ; 10$: mov (r1)+,r2 ; Get the next input string beq 30$ ; Exit at NULL string ; 20$: movb (r2)+,(r0)+ ; Copy the string bne 20$ ; Until the null dec r0 ; Back up over the null br 10$ ; Get another ; 30$: clrb (r0) ; Always get a null string mov C$PMTR+0(r5),r0 ; Reget the first argument jmp cret$ .end