2 ; Ullrich von Bassewitz, 31.05.1998
4 ; char* strncat (char* dest, const char* src, size_t n);
9 .importzp ptr1, ptr2, ptr3, tmp1, tmp2
12 eor #$FF ; one's complement to count upwards
23 sta ptr3 ; remember for function return
36 ; end found, get offset in y into pointer
45 ; copy src. We've put the ones complement of the count into the counter, so
46 ; we'll increment the counter on top of the loop
49 ldx tmp1 ; low counter byte
64 ; done, set the trailing zero and return pointer to dest