xref: /original-bsd/lib/libc/hp300/string/strcpy.s (revision 4b565e61)
1/*-
2 * Copyright (c) 1990, 1993
3 *	The Regents of the University of California.  All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * the Systems Programming Group of the University of Utah Computer
7 * Science Department.
8 *
9 * %sccs.include.redist.c%
10 */
11
12#if defined(LIBC_SCCS) && !defined(lint)
13	.asciz "@(#)strcpy.s	8.1 (Berkeley) 06/04/93"
14#endif /* LIBC_SCCS and not lint */
15
16#include "DEFS.h"
17
18ENTRY(strcpy)
19	movl	sp@(8),a0		/* a0 = fromaddr */
20	movl	sp@(4),d0		/* return value is toaddr */
21	movl	d0,a1			/* a1 = toaddr */
22scloop:
23	movb	a0@+,a1@+		/* copy a byte */
24	jne	scloop			/* copied non-null, keep going */
25	rts
26