xyzzy

ASCII.cmd demo

ASCII usage message:
usage: ASCII <argument> [...]
where <argument> can have the form: |  cc    hexadecimal digits 00 .. FE
  c     a printable ASCII character |  cc    ASCII code symbol (e.g. CR)
  \c    C escape sequence (e.g. \r) |  ccc   ASCII code symbol like ACK
  ^c    ^@ .. ^_ or ^? control code |  ..    indicates argument subrange
  ??c   ANSI C trigraphs (e.g. ??/) |  ...   indicates argument subrange
  \ccc  octal  sequence (e.g. \015) |  ALL   list 33 ASCII control codes
  \xcc  C hex. sequence (e.g. \x0D) |  IBM   difference codepage 437/850
  ccc   3 decimal digits 000 .. 255 |  ISO   list 20 ISO C sequences
  256   256 untranslated characters |  LOW   128 char.s: strict US ASCII
For codes above 127 DEL the current codepage is used.  Caveat: \e is no C.
Except from lists like ALL or 256 the result shows all translations as in:
ASCII BEL = \x07 =   7 = \007 = ^G = C \a
ASCII  BS = \x08 =   8 = \010 = ^H = C \b
ASCII  HT = \x09 =   9 = \011 = ^I = C \t = aka TAB

ASCII ALL output (IBM graphical output removed here):
ASCII | hex. | dec | oct. | aka         ASCII | hex. | dec | oct. | aka
  NUL | \x00 |   0 | \000 | ^@ \0         SOH | \x01 |   1 | \001 | ^A
  STX | \x02 |   2 | \002 | ^B            ETX | \x03 |   3 | \003 | ^C
  EOT | \x04 |   4 | \004 | ^D            ENQ | \x05 |   5 | \005 | ^E
  ACK | \x06 |   6 | \006 | ^F            BEL | \x07 |   7 | \007 | ^G \a
   BS | \x08 |   8 | \010 | ^H \b          HT | \x09 |   9 | \011 | ^I \t TAB
   LF | \x0A |  10 | \012 | ^J \n EOL      VT | \x0B |  11 | \013 | ^K \v
   FF | \x0C |  12 | \014 | ^L \f          CR | \x0D |  13 | \015 | ^M \r
   SO | \x0E |  14 | \016 | ^N             SI | \x0F |  15 | \017 | ^O
  DLE | \x10 |  16 | \020 | ^P            DC1 | \x11 |  17 | \021 | ^Q
  DC2 | \x12 |  18 | \022 | ^R            DC3 | \x13 |  19 | \023 | ^S
  DC4 | \x14 |  20 | \024 | ^T            NAK | \x15 |  21 | \025 | ^U
  SYN | \x16 |  22 | \026 | ^V            ETB | \x17 |  23 | \027 | ^W
  CAN | \x18 |  24 | \030 | ^X             EM | \x19 |  25 | \031 | ^Y
  SUB | \x1A |  26 | \032 | ^Z EOF        ESC | \x1B |  27 | \033 | ^[ \e
   FS | \x1C |  28 | \034 | ^\             GS | \x1D |  29 | \035 | ^]
   RS | \x1E |  30 | \036 | ^^             US | \x1F |  31 | \037 | ^_
   SP | \x20 |  32 | \040 | ' '           DEL | \x7F | 127 | \177 | ^?

ASCII ISO output (ISO C trigraphs and escape sequences, adding \e):
ASCII | hex. | dec | oct. | aka           NUL | \x00 |   0 | \000 | ^@ \0
  BEL | \x07 |   7 | \007 | ^G \a          BS | \x08 |   8 | \010 | ^H \b
   HT | \x09 |   9 | \011 | ^I \t TAB      LF | \x0A |  10 | \012 | ^J \n EOL
   VT | \x0B |  11 | \013 | ^K \v          FF | \x0C |  12 | \014 | ^L \f
   CR | \x0D |  13 | \015 | ^M \r         ESC | \x1B |  27 | \033 | ^[ \e
  '"' | \x22 |  34 | \042 | \"            '#' | \x23 |  35 | \043 | ??=
  "'" | \x27 |  39 | \047 | \'            '?' | \x3F |  63 | \077 | \?
  '[' | \x5B |  91 | \133 | ??(           '\' | \x5C |  92 | \134 | ??/ \\
  ']' | \x5D |  93 | \135 | ??)           '^' | \x5E |  94 | \136 | ??'
  '{' | \x7B | 123 | \173 | ??<           '|' | \x7C | 124 | \174 | ??!
  '}' | \x7D | 125 | \175 | ??>           '~' | \x7E | 126 | \176 | ??-

ASCII LOW output (dots mark tens, IBM graphical output removed here):
    oct   |                                 | 10  11  12  13  14  15  16  17  |
dec    hex|  0   1   2   3   4   5   6   7  |  8   9   A   B   C   D   E   F  |
----------+---------------------------------+---------------------------------+
  0 000 00|.NUL SOH STX ETX EOT ENQ ACK BEL | BS  HT .LF  VT  FF  CR  SO  SI  |
 16 020 10| DLE DC1 DC2 DC3.DC4 NAK SYN ETB | CAN EM  SUB ESC FS  GS .RS  US  |
 32 040 20|      !   "   #   $   %   &   '  |. (   )   *   +   ,   -   .   /  |
 48 060 30|  0   1 . 2   3   4   5   6   7  |  8   9   :   ; . <   =   >   ?  |
 64 100 40|  @   A   B   C   D   E . F   G  |  H   I   J   K   L   M   N   O  |
 80 120 50|. P   Q   R   S   T   U   V   W  |  X   Y . Z   [   \   ]   ^   _  |
 96 140 60|  `   a   b   c . d   e   f   g  |  h   i   j   k   l   m . n   o  |
112 160 70|  p   q   r   s   t   u   v   w  |. x   y   z   {   |   }   ~ DEL  |

ASCII IBM output (for codepage 850):
    oct   |                                 | 10  11  12  13  14  15  16  17  |
dec    hex|  0   1   2   3   4   5   6   7  |  8   9   A   B   C   D   E   F  |
----------+---------------------------------+---------------------------------+
144 220 90| CodePage 437 vs 850 differences |              ø       Ø   ×      |
160 240 A0| (characters 000..154 identical) |      ® .                        |
176 260 B0|                .     Á   Â   À  |  ©                   ¢ . ¥      |
192 300 C0|                          ã   Ã  |.                             ¤  |
208 320 D0|  ð   Ð . Ê   Ë   È   €   Í   Î  |  Ï             .     ¦   Ì      |
224 340 E0|  Ó       Ô   Ò   õ   Õ .     þ  |  Þ   Ú   Û   Ù   ý   Ý   ¯   ´  |
240 360 F0|. ­           ¾   ¶   §       ¸  |      ¨ .     ¹   ³              |

XHTML validator Last update: 18 Aug 2004 18:00 by F.Ellermann