1: /*
   2:  * Copyright (c) 1987 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifdef LIBC_SCCS
   8:         <@(#)strcpy.s	1.1 (Berkeley) 1/20/87\0>
   9:         .even
  10: #endif LIBC_SCCS
  11: 
  12: /*
  13:  * Copy string s2 over top of s1.
  14:  * Return base of s1.
  15:  *
  16:  * char *
  17:  * strcpy(s1, s2)
  18:  *	char *s1, *s2;
  19:  */
  20: #include "DEFS.h"
  21: 
  22: ENTRY(strcpy)
  23:         mov     2(sp),r0        / r0 = s1
  24:         mov     4(sp),r1        / r1 = s2
  25: 1:
  26:         movb    (r1)+,(r0)+     / copy s2 over s1
  27:         bne     1b              / but don't pass end of s2
  28:         mov     2(sp),r0        / and return s1
  29:         rts     pc

Defined functions

_strcpy defined in line 22; used 1920 times
Last modified: 1987-01-25
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 5015
Valid CSS Valid XHTML 1.0 Strict