mirror of
https://github.com/diegocr/libnix.git
synced 2026-09-12 03:30:29 +00:00
27 lines
333 B
C
27 lines
333 B
C
#ifndef mc68000
|
|
|
|
#include <string.h>
|
|
|
|
char *strcat(char *s1,const char *s2)
|
|
{ char *s=s1;
|
|
|
|
do;while(*s++); --s; do;while((*s++=*s2++)); return s1;
|
|
}
|
|
|
|
#else
|
|
|
|
asm(
|
|
" .globl _strcat;"
|
|
"_strcat:;"
|
|
" movml sp@(4:W),d0/a0;"
|
|
" movel d0,a1;"
|
|
"L2: tstb a1@+;"
|
|
" jne L2;"
|
|
" subql #1,a1;"
|
|
"L1: moveb a0@+,a1@+;"
|
|
" jne L1;"
|
|
" rts;"
|
|
);
|
|
|
|
#endif
|