8086 (was Re: more talking to the press.)

From: Sean 'Captain Napalm' Conner <spc_at_conman.org>
Date: Fri Nov 14 19:25:31 2003

It was thus said that the Great Patrick Rigney once stated:
>
> > -----Original Message-----
> > From: cctalk-bounces_at_classiccmp.org
> > [mailto:cctalk-bounces_at_classiccmp.org]On Behalf Of Sean 'Captain Napalm'
> > Conner
> > Sent: Friday, November 14, 2003 1:17 PM
> > To: cctalk_at_classiccmp.org
> > Subject: Re: 8086 (was Re: more talking to the press.)
> > Um, that should be:
> >
> > void foofill(char *start,char *end)
> > {
> > while (start < end)
> > {
> > *start++ = 0;
> > }
> > }
>
> yeah... and, I assume if you specify start and end with the same value, you
> want that ONE byte filled with zero, so the test should be:
>
> while (start <= end)

  Or even:

void foofill(char *start,char *end)
{
  assert(start != NULL);
  assert(end != NULL);
  assert(start <= end);

  do
  {
    *start++ = 0;
  } while (start < end);
}

  -spc (8-)
Received on Fri Nov 14 2003 - 19:25:31 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:19 BST