| Copyright 1984 by the Massachusetts Institute of Technology

| copy.s
|
| This is a routine to do reasonably efficient block copies on the
| 68000. Sometime it should be unrolled to be even more efficient.

| Calling sequence:
|	copy( from, to, len)
|	char	*from;			/* copy bytes from here */
|	char	*to;			/* to here */
|	int	len;			/* this many */

	.text

.globl	copy

from	=	16		| first arg
to	=	20		| second
len	=	24		| third

copy:
	movl	a0,sp@+
	movl	a1,sp@+
	movl	d0,sp@+
	movl	sp@(from),a0
	movl	sp@(to),a1
	movl	sp@(len),d0
	subql	#1,d0

L1:	movb	a0@+,a1@+
	dbf	d0,L1

	movl	sp@-,d0
	movl	sp@-,a1
	movl	sp@-,a0
	rts
