Files
rc64/gen/b2hex.cpp
Simone Coco 0a097849af Squashed 'external/xbyak/' content from commit 9d8ff37
git-subtree-dir: external/xbyak
git-subtree-split: 9d8ff37306f39c6a71cf998078cbe880ce5dc224
2025-12-23 16:51:03 +01:00

17 lines
274 B
C++

#include <stdio.h>
int main()
{
puts("enum {");
for (int i = 0; i < 256; i++) {
printf(" B");
for (int j = 0; j < 8; j++) {
putchar(i & (1 << (7 - j)) ? '1' : '0');
}
printf("= %d", i);
if (i < 255) putchar(',');
putchar('\n');
}
puts("};");
return 0;
}