The following implementation of printIntegerInBase shortens the core
by 138 bytes. It should be faster as well, since it only has 1 loop.
void printIntegerInBase(unsigned long n, unsigned long base)
{
int d;
if (n == 0) {
printByte('0');
return;
}
for ( ; n > 0; n /= base) {
d = n % base;
printByte( d < 10 ?
'0' + d :
'A' + d - 10);
}
}