/************************************************************* * File: lib/bcopy.c * Purpose: Part of C runtime library * Author: Phil Bunce (pjb@carmel.com) * Revision History: * 970304 Start of revision history */ /* ** This routine should be rewritten in assembly language to ** improve performance. */ /** bcopy(src,dst,bytes) copy bytes from src to destination */ bcopy(src,dst,bytes) char *src,*dst; int bytes; { if (dst < src) for (;bytes>0;bytes--) *dst++ = *src++; else { dst += (bytes-1); src += (bytes-1); for (;bytes>0;bytes--) *dst-- = *src--; } }