/* * @(#)common.c 1.1 94/10/31 Copyright (c) 1985 by Sun Microsystems, Inc. */ /* * Common code for various bootstrap routines. */ bzero(p, n) register char *p; register int n; { register char zeero = 0; while (n > 0) *p++ = zeero, n--; /* Avoid clr for 68000, still... */ } bcopy(src, dest, count) register char *src, *dest; register int count; { while (--count != -1) *dest++ = *src++; } /* * Compare strings: s1>s2: >0 s1==s2: 0 s1>= 1; n++; #define STEP temp = *from++,*to++ = *from++,*to++ = temp /* round to multiple of 8 */ while ((--n) & 07) STEP; n >>= 3; while (--n >= 0) { STEP; STEP; STEP; STEP; STEP; STEP; STEP; STEP; } }