xref: /csrg-svn/lib/libc/hp300/string/strcpy.s (revision 61123)
141815Sbostic/*-
2*61123Sbostic * Copyright (c) 1990, 1993
3*61123Sbostic *	The Regents of the University of California.  All rights reserved.
441815Sbostic *
541815Sbostic * This code is derived from software contributed to Berkeley by
641815Sbostic * the Systems Programming Group of the University of Utah Computer
741815Sbostic * Science Department.
841815Sbostic *
941815Sbostic * %sccs.include.redist.c%
1041815Sbostic */
1141815Sbostic
1241815Sbostic#if defined(LIBC_SCCS) && !defined(lint)
13*61123Sbostic	.asciz "@(#)strcpy.s	8.1 (Berkeley) 06/04/93"
1441815Sbostic#endif /* LIBC_SCCS and not lint */
1541815Sbostic
1641815Sbostic#include "DEFS.h"
1741815Sbostic
1841815SbosticENTRY(strcpy)
1941815Sbostic	movl	sp@(8),a0		/* a0 = fromaddr */
2041815Sbostic	movl	sp@(4),d0		/* return value is toaddr */
2141815Sbostic	movl	d0,a1			/* a1 = toaddr */
2241815Sbosticscloop:
2341815Sbostic	movb	a0@+,a1@+		/* copy a byte */
2441815Sbostic	jne	scloop			/* copied non-null, keep going */
2541815Sbostic	rts
26