/* Bzero and Bzerol. See COPYLEFT.JRD. */ #ifdef __GNUC__ /* doing things right, 32-bit ints? ok, just do it this way... */ asm (".text"); asm (".even\n.globl _bzero\n_bzero:"); #else void bzero(buf, nbytes) char * buf; int nbytes; { bzerol(buf, nbytes); } #endif void bzerol(buf, nbytes) char * buf; long nbytes; { long nwords; /* 32-bit words... */ long * p; if ((nbytes > 0) && ((int )buf & 1)) /* if odd addr, make it even */ { *buf++ = 0; --nbytes; } for (p = (long * )buf, nwords = nbytes >> 2 ; nwords > 0 ; --nwords) *p++ = 0; for (buf = (char * )p, nbytes &= 3 ; nbytes > 0 ; --nbytes) *buf++ = 0; }