On 2/17/07, Dave McGuire <mcguire@...> wrote:
> On Feb 17, 2007, at 12:24 PM, Mark Rages wrote:
> >> There is no printf format specifier for binary in C... You have to
> >> write such
> >> a function yourself.
> > That's not what I asked. In Microchip asm, I can type an integer
> > constant in binary as b'00000000'. I was wondering if SDCC supports
> > something similar.
> I do stuff like that in hex. I find that it's pretty much
> "automatic" in my brain if I visualize four bits at a time being one
> hex digit.
That's what I've been doing, but for a lot of things in PIC
programming, each bit of a register means something different. I
think it would make for clearer code to just show it in binary.
You think that it is a secret, but it never has been one.
- fortune cookie