Below is the file 'memcpy.c' from this revision. You can also download the file.

/* memcpy.c */

#include "types.h"

void *memcpy(void *str1, const void *str2, size_t n)
{
    char *dest = str1;
    const char *src = str2;

    while (n--)
	*dest++ = *src++;

    return str1;
}