home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / charsets / table.c < prev    next >
C/C++ Source or Header  |  2020-01-01  |  572b  |  25 lines

  1. #include <stdio.h>
  2. /*
  3.   Print a 16 x 16 character table on the standard output device.
  4.   Make sure your communication path and software are set to 8 bits.
  5.   F. da Cruz, Columbia U, 1992
  6. */
  7. main() {
  8.     int i,j,k;
  9.     printf("    00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15\n");
  10.     for (i = 0; i < 16; i++) {
  11.         printf(" %02d      ",i);
  12.     for (j = 2; j < 8; j++) {
  13.         k = (j * 16) + i;
  14.         if (k == 127) printf("   ");
  15.         else printf("  %c", k);
  16.     }
  17.     printf("      ");
  18.     for (j = 10; j < 16; j++) {
  19.         printf("  %c", (j * 16) + i);
  20.     }
  21.     printf("\n");
  22.     }
  23. }
  24.  
  25.