Subversion Repositories Kolibri OS

Rev

Rev 8793 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
  2. #include <string.h>
  3.  
  4. char* strcpy(char* to, const char* from)
  5. {
  6.     int d0, d1, d2;
  7.     __asm__ __volatile__(
  8.         "1:\tlodsb\n\t"
  9.         "stosb\n\t"
  10.         "testb %%al,%%al\n\t"
  11.         "jne 1b"
  12.         : "=&S"(d0), "=&D"(d1), "=&a"(d2)
  13.         : "0"(from), "1"(to)
  14.         : "memory");
  15.     return to;
  16. }
  17.