home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / d / libc / libc-4.6 / libc-4 / libc-linux / sysdeps / i386 / strcat.c.old < prev    next >
Encoding:
Text File  |  1994-08-20  |  303 b   |  18 lines

  1. #include <string.h>
  2.  
  3. #include "asm-ops.h"
  4.  
  5. char * strcat(char * dest,const char * src)
  6. {
  7. __asm__("cld\n\t"
  8.     "repne\n\t"
  9.     "scasb\n\t"
  10.     "decl %1\n"
  11.     LL(1) "\tlodsb\n\t"
  12.     "stosb\n\t"
  13.     "testb %%al,%%al\n\t"
  14.     "jne " LB(1)
  15.     ::"S" (src),"D" (dest),"a" (0),"c" (0xffffffff):"si","di","ax","cx");
  16. return dest;
  17. }
  18.