From: "D Poinsett"
Newsgroups: sci.electronics.design
Subject: Re: To C or not to C
Date: Sun, 5 Jan 2003 14:49:52 -0500
Organization: Posted via Supernews, http://www.supernews.com
Message-ID:
References: <3e162515$0$27994$afc38c87@news.optusnet.com.au> <3e1853bb.20798186@news.planet.nl> <3e187255$0$57466$1b62eedf@news.euronet.nl> <3e1880cf$0$57462$1b62eedf@news.euronet.nl> <3j2h1voc48b42s07rtbbvsr1r3rvuk0nsp@4ax.com>
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
Hi Spehro,
Smart compiler! Which one is it?
Your standards are high. I would not fault a commercial compiler for not
detecting this special case.
Dave Poinsett
"Spehro Pefhany" wrote in message
news:3j2h1voc48b42s07rtbbvsr1r3rvuk0nsp@4ax.com...
> On Sun, 5 Jan 2003 14:32:37 -0500, the renowned "D Poinsett"
> wrote:
>
> >Hi Frank,
> >
> >Though some HC11/HC12 compiler somewhere might use the native bit set
> >instructions in this example, mine does not and I suspect that most
> >compilers do not since every processor I can think of has native
> >instructions for logical operations like val |= 0x55.
>
> Both the PIC and 8051 compilers I use produce native bit set
> instructions for things like val |= 0x4; For 0x55, of course, it
> do a bitwise OR.
>
> IMHO, anything else would be unacceptable for a commercial-quality
> compiler.
>
> Best regards,
> Spehro Pefhany
> --
> "it's the network..." "The Journey is the reward"
> speff@interlog.com Info for manufacturers:
http://www.trexon.com
> Embedded software/hardware/analog Info for designers:
http://www.speff.com