I am using simultaneously in the 8bit C51 and 16bit compilers for two related projects.
Am I correct that for 8bit integers, 8-bit compiler uses %bu in printf() 16bit compiler uses %hu ?
"C51 manual pg 288: mentions L and B modifiers, but does not explicitly indicate size." What's the date on your manual? Mine's 09.2001, and p291 says: "The optional characters b or B and l or L may immediately precede the type character to respectively specify char or long versions of the integer types d, i, u, o, x, and X." Although not explicitly stated in that very paragraph, the Manual clearly tells you that char is 8 bits, int is 16 bits, and long int is 32 bits. Online manual: "The optional characters b or B and l or L may immediately precede the type character to respectively specify char or long versions of the integer types d, i, u, o, x, and X." http://www.keil.com/support/man/docs/c51/c51_printf.htm Seems clear enough to me?