home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / libnix-0.8-src.lha / libnix-0.8 / sources / nix / string / strcpy.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-12  |  266 b   |  26 lines

  1. #ifndef mc68000
  2.  
  3. #include <string.h>
  4.  
  5. char *strcpy(char *s1,const char *s2)
  6. { char *s=s1;
  7.   do
  8.     *s++=*s2;
  9.   while(*s2++!='\0');
  10.   return s1;
  11. }
  12.  
  13. #else
  14.  
  15. asm("
  16.     .globl    _strcpy
  17. _strcpy:
  18.     moveml    sp@(4:W),d0/a0
  19.     movel    d0,a1
  20. L1:    moveb    a0@+,a1@+
  21.     jne    L1
  22.     rts
  23. ");
  24.  
  25. #endif
  26.