Today, while porting the MRY Print Spooler banner-page language processor to TOPS-20, I discovered that the KCC C Compiler does not support binary constants.

I really didn't want to re-code 4,600 lines of big-letter font C-headers.

So I added binary constants to KCC-6.   It was trivial.

$diff -C 7 tops20:<kcc-6.kcc>cclex.c cclex.c
*** dist:<kcc-6.kcc>cclex.c Sun Mar 6 23:58:24 2022
--- work:<kccdist.kcc-6.kcc>cclex.c Mon Mar 7 20:27:17 2022
***************
*** 288,301 ****
--- 288,306 ----
if ((c = *cp) == '0') { /* Octal/Hex prefix? */
c = *++cp;
if (c == 'x' || c == 'X') { /* Hex (base 16) */
while (isxdigit(c = *++cp)) {
if (v & (017 << (TGSIZ_LONG-4))) ovfl++;
v = ((unsigned long)v << 4) + toint(c);
}
+ } else if (c == 'b' || c == 'B') { /* Binary (base 2) */
+ while (((c = *++cp) == '0' || c == '1')) {
+ if (v & (01 << (TGSIZ_LONG-1))) ovfl++;
+ v = ((unsigned long)v << 1) + toint(c);
+ }
} else { /* Octal (base 8) */
while (isodigit(c)) {
if (v & (07 << (TGSIZ_LONG-3))) ovfl++;
v = ((unsigned long)v << 3) + c - '0';
c = *++cp;
}
if (isdigit(c)) { /* Helpful msg for common error */