Last active
January 29, 2018 12:05
-
-
Save Polda18/ec8a0752cd52033ba2a96ecff538ce1c to your computer and use it in GitHub Desktop.
Bytes text representation with 0x00-0xff hexadecimal ASCII table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void) { | |
fprintf(stdout, ">> X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 XA XB XC XD XE XF\n"); | |
for(int i = 0; i < 16; ++i) { | |
fprintf(stdout, "%XX", i); | |
for(int j = 0; j < 16; ++j) { | |
unsigned char num = i * 16 + j; | |
if(num < 0x20) | |
fprintf(stdout, " .."); | |
else | |
fprintf(stdout, " %c", num); | |
} | |
fprintf(stdout, "\n"); | |
} | |
fprintf(stdout, "--------------------------------------------------\n"); | |
fprintf(stdout, "OEM DISPLAY 256 CHARS ::: BYTES TEXT REPRESENTATES\n"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment