Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site amdcad.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!amdcad!jimb From: jimb@amdcad.UUCP (Jim Budler) Newsgroups: net.sources.mac Subject: Re: macbin.c (Sorry, contained BSD4.2 function) Message-ID: <10426@amdcad.UUCP> Date: Sat, 8-Mar-86 14:55:08 EST Article-I.D.: amdcad.10426 Posted: Sat Mar 8 14:55:08 1986 Date-Received: Sun, 9-Mar-86 07:58:25 EST Reply-To: jimb@amdcad.UUCP (Jim Budler) Organization: AMD, Sunnyvale, California Lines: 55 Sorry. Here is a version of bzero.c which came across the net last year with top. It is Vax only, but hopefully will help the non-4.2. ---------------------< cut here >---------------------------- /* * Fast, sleazy, and ugly zero function. * * Note that this will only work on a VAX, but it is real easy to write a * similar function for whatever machine you may need. If nothing else, * just a simple loop in C will suffice. * * Dave Johnson, Rice University. * * Enhanced by William LeFebvre of Rice University to handle zeroing more * than 64K. */ # define K 1024 /* * bzero(memory, amount) - set "amount" bytes starting at "memory" to the * value 0. */ bzero(memory, amount) char *memory; int amount; { while (amount >= 64*K) { _bzero64(memory, 64*K-1); memory += 64*K-1; amount -= 64*K-1; } _bzero64(memory, amount); } _bzero64(memory, amount) char *memory; int amount; { asm(" movc5 $0, (sp), $0, 8(ap), *4(ap)"); } -- Jim Budler Advanced Micro Devices, Inc. (408) 749-5806 Usenet: {ucbvax,decwrl,ihnp4,allegra,intelca}!amdcad!jimb Compuserve: 72415,1200