printf("%#02bx",0xff); The above line of code does what I'd expect, ie it prints out "0xff". However, printf("%#02bx",0x00); prints out "0x000000000000000"..... for a very long time. The same happens for any value between 0x00 and 0x0f, 0x10 to 0xff work as expected. Is this a bug or am I being stupid? I'm using C51 V7.
I checked that with C166, same result: a long tail of zeros. Seems like the source code (including bugs) for printf is the same for C51 and C166. - Mike