How to print numbers in cc65 using cprintf ?
The online cc65/c64 IDE is great! Let's me do some development at work where they don't allow me to install softwares.
For some reason this code won't produce any output for "score". Have tried many different formatting options in cprintf, but none work:
#include \<conio.h>
#include \<stdio.h>
int main(void) {
unsigned char score = 123;
clrscr();
cprintf ( "Score is %03u", score );
cprintf("%03u",123);
return 0;
}
Thanks Faraz, you found a real bug in the CC65 implementation, not in your code! The C64 and VIC-20 builds were leaving strings as plain ASCII, so printf and cprintf could not recognise %d and friends and printed nothing.
Hopefully fixed now but I am going to do more looking into the wider implications ...

Thanks! It is working well for me.. Great tool as I can develop during my spare time at work where I can't install an emulator nor the cc65 compiler..