HASCII table
A text character is a single letter or digit or punctuation mark or graphical glyph. The Hybrix compiler represents characters as a BYTE number between 0 and 255. The standard mapping of characters for each number is called HASCII. It is based on the ASCII (American Standard Code for Information Interchange) and ISO/IEC 8859-1 standards, but with some differences for control characters and graphical glyphs.
Control code meanings
While codes 32 through 255 are regular printable characters with a standardized tile appearance, codes 0 through 31 are special control codes. Unlike regular characters, the control codes have three separate interpretations:
- As console actions: Many of these codes cause the
CONSOLE::PRINT()function to perform special actions such as moving the cursor, clearing the screen, or changing the current color. The implementation can be found in the [CONSOLE] framework file. Some codes are widely standardized by ASCII but irrelevant to Hybrix, and soCONSOLE::PRINT()simply ignores them. - As special keyboard keys: The
CONSOLE::READ_KEY()function returns control codes for certain non-printing keyboard keys such as the arrow keys, theENTERkey, or theESCkey. - As tile indexes: The console's tilemap will render the control codes as ordinary tile indexes, however their graphical appearance isn't standardized. The framework starter font simply shows "⮽" for these characters. You could invent your own tile images, though.
| Hex | Escape | Name | Key | Description |
|---|---|---|---|---|
| $00 | null | (unused ASCII) Hybrix strings don't normally contain null bytes. | ||
| $01 | {RESET} | reset | action: disable the modes for scroll off, reverse, and matte keyboard shortcut: SHIFT + ESC | |
| $02 | {SOFF} | scroll off | action: enable a mode that prevents scrolling when the cursor reaches the bottom of the screen, useful for printing text on the last line keyboard shortcut: CTRL + B | |
| $03 | {SUP} | scroll up | action: scroll the screen contents upwards keyboard shortcut: CTRL + C | |
| $04 | {SDOWN} | scroll down | action: scroll the screen contents downwards keyboard shortcut: CTRL + D | |
| $05 | {CLS} | clear screen | action: erase the screen by filling with space characters keyboard shortcut: CTRL + BACKSPACE Apple keyboards: CTRL + DELETE | |
| $06 | {CLL} | clear line | action: erase the current line by filling with space characters keyboard shortcut: CTRL + SHIFT + BACKSPACE Apple keyboards: CTRL + SHIFT + DELETE | |
| $07 | bell | (unused ASCII) | ||
| $08 | backspace | BACKSPACE | (not printable) a keyboard key that typically erases one character leftwards Note: Apple calls this key DELETE ( ⌫ ) instead of BACKSPACE. Apple's rightwards erasing key is called "forward delete" ( ⌦ ). | |
| $09 | {TAB} | tab | TAB | action: move the cursor rightwards to the next tab stop |
| $0A | {N} | newline (LF) | ENTER | action: move to the first column of the next line (ASCII "line feed") Apple keyboards: RETURN ( ⏎ ) |
| $0B | {HOME} | home | HOME | action: move to the first column of the top line Apple keyboards: FN + LEFT |
| $0C | {END} | end | END | action: move to the first column of the bottom line Apple keyboards: FN + RIGHT |
| $0D | {CR} | CR | action: move to the first column of the current line (ASCII "carriage return") keyboard shortcut: CTRL + HOME Apple keyboards: CTRL + FN + LEFT Note: Apple's RETURN key is mapped to {N}, not {CR}. | |
| $0E | {REV} | reverse | action: enable the reversed theme mode, which swaps palette colors #0 (clear) and #48 (theme color A) This effect is used to blink the cursor. keyboard shortcut: CTRL + , | |
| $0F | {MAT} | matte | enable matte coloring mode, which changes color #0 (clear) to be IO::MATTE_COLOR keyboard shortcut: CTRL + . | |
| $10 | {0} | black | action: change the text color* | |
| $11 | {1} | white | action: change the text color* | |
| $12 | {2} | red | action: change the text color* | |
| $13 | {3} | orange | action: change the text color* | |
| $14 | {4} | yellow | action: change the text color* | |
| $15 | {5} | green | action: change the text color* | |
| $16 | {6} | cyan | action: change the text color* | |
| $17 | {7} | blue | action: change the text color* | |
| $18 | {8} | purple | action: change the text color* | |
| $19 | {9} | violet | action: change the text color* | |
| $1A | {META} | meta | unimplemented by CONSOLE::PRINT(), but meant for use instead of {ESC} as the first byte of custom sequences (similar to the CSI byte $9B from ISO 2022) | |
| $1B | {ESC} | escape key | ESC | (not printable) modern programs typically use this keyboard key to "go back" to a previous menu or state |
| $1C | {U} | cursor up | UP | action: move the cursor up by one line |
| $1D | {D} | cursor down | DOWN | action: move the cursor down by one line |
| $1E | {L} | cursor left | LEFT | action: move the cursor left by one column |
| $1F | {R} | cursor right | RIGHT | action: move the cursor right by one column |
*For text color palette indexes, refer to the Palix: themes chapter of the Hybrix Machine Reference. The keyboard shortcut is CTRL + the number key.
$00-$3F Control codes & punctuation
| # | Hex | Escape | Name | # | Hex | Escape | Unicode | |
|---|---|---|---|---|---|---|---|---|
| 0 | $00 | null | 32 | $20 | space | |||
| 1 | $01 | {RESET} | reset | 33 | $21 | ! | ||
| 2 | $02 | {SOFF} | scroll off | 34 | $22 | {QUOTE} | " | |
| 3 | $03 | {SUP} | scroll up | 35 | $23 | # | ||
| 4 | $04 | {SDOWN} | scroll down | 36 | $24 | $ | ||
| 5 | $05 | {CLS} | clear screen | 37 | $25 | % | ||
| 6 | $06 | {CLL} | clear line | 38 | $26 | & | ||
| 7 | $07 | bell | 39 | $27 | ' | |||
| 8 | $08 | backspace | 40 | $28 | ( | |||
| 9 | $09 | {TAB} | tab | 41 | $29 | ) | ||
| 10 | $0A | {N} | newline (LF) | 42 | $2A | * | ||
| 11 | $0B | {HOME} | home | 43 | $2B | + | ||
| 12 | $0C | {END} | end | 44 | $2C | , | ||
| 13 | $0D | {CR} | CR | 45 | $2D | - | ||
| 14 | $0E | {REV} | reverse | 46 | $2E | . | ||
| 15 | $0F | {MAT} | matte | 47 | $2F | / | ||
| 16 | $10 | {0} | black | 48 | $30 | 0 | ||
| 17 | $11 | {1} | white | 49 | $31 | 1 | ||
| 18 | $12 | {2} | red | 50 | $32 | 2 | ||
| 19 | $13 | {3} | orange | 51 | $33 | 3 | ||
| 20 | $14 | {4} | yellow | 52 | $34 | 4 | ||
| 21 | $15 | {5} | green | 53 | $35 | 5 | ||
| 22 | $16 | {6} | cyan | 54 | $36 | 6 | ||
| 23 | $17 | {7} | blue | 55 | $37 | 7 | ||
| 24 | $18 | {8} | purple | 56 | $38 | 8 | ||
| 25 | $19 | {9} | violet | 57 | $39 | 9 | ||
| 26 | $1A | {META} | meta | 58 | $3A | : | ||
| 27 | $1B | {ESC} | escape key | 59 | $3B | ; | ||
| 28 | $1C | {U} | cursor up | 60 | $3C | < | ||
| 29 | $1D | {D} | cursor down | 61 | $3D | = | ||
| 30 | $1E | {L} | cursor left | 62 | $3E | > | ||
| 31 | $1F | {R} | cursor right | 63 | $3F | ? |
$40-$7F Alphabet
| # | Hex | Escape | Unicode | # | Hex | Escape | Unicode | |
|---|---|---|---|---|---|---|---|---|
| 64 | $40 | @ | 96 | $60 | ` | |||
| 65 | $41 | A | 97 | $61 | a | |||
| 66 | $42 | B | 98 | $62 | b | |||
| 67 | $43 | C | 99 | $63 | c | |||
| 68 | $44 | D | 100 | $64 | d | |||
| 69 | $45 | E | 101 | $65 | e | |||
| 70 | $46 | F | 102 | $66 | f | |||
| 71 | $47 | G | 103 | $67 | g | |||
| 72 | $48 | H | 104 | $68 | h | |||
| 73 | $49 | I | 105 | $69 | i | |||
| 74 | $4A | J | 106 | $6A | j | |||
| 75 | $4B | K | 107 | $6B | k | |||
| 76 | $4C | L | 108 | $6C | l | |||
| 77 | $4D | M | 109 | $6D | m | |||
| 78 | $4E | N | 110 | $6E | n | |||
| 79 | $4F | O | 111 | $6F | o | |||
| 80 | $50 | P | 112 | $70 | p | |||
| 81 | $51 | Q | 113 | $71 | q | |||
| 82 | $52 | R | 114 | $72 | r | |||
| 83 | $53 | S | 115 | $73 | s | |||
| 84 | $54 | T | 116 | $74 | t | |||
| 85 | $55 | U | 117 | $75 | u | |||
| 86 | $56 | V | 118 | $76 | v | |||
| 87 | $57 | W | 119 | $77 | w | |||
| 88 | $58 | X | 120 | $78 | x | |||
| 89 | $59 | Y | 121 | $79 | y | |||
| 90 | $5A | Z | 122 | $7A | z | |||
| 91 | $5B | [ | 123 | $7B | {LB} | { | ||
| 92 | $5C | \ | 124 | 7C | | | |||
| 93 | $5D | ] | 125 | $7D | {RB} | } | ||
| 94 | $5E | ^ | 126 | $7E | ~ | |||
| 95 | $5F | _ | 127 | $7F | {:-)} | ☺ |
$80-$BF Glyphs
| # | Hex | Escape | Unicode | # | Hex | Escape | Unicode | |
|---|---|---|---|---|---|---|---|---|
| 128 | $80 | {-->} | 🠞 | 160 | $A0 | {EURO} | € | |
| 129 | $81 | { ^ } | 🠝 | 161 | $A1 | ¡ | ||
| 130 | $82 | {<--} | 🠜 | 162 | $A2 | {CENT} | ¢ | |
| 131 | $83 | { V } | 🠟 | 163 | $A3 | {POUND} | £ | |
| 132 | $84 | ▶ | 164 | $A4 | {[ ]} | ☐ | ||
| 133 | $85 | ▲ | 165 | $A5 | {[./]} | ☑ | ||
| 134 | $86 | ◀ | 166 | $A6 | {( )} | ⵔ | ||
| 135 | $87 | ▼ | 167 | $A7 | {(O)} | ◉ | ||
| 136 | $88 | { +-} | ┣ | 168 | $A8 | ⚫ | ||
| 137 | $89 | {-'-} | ┻ | 169 | $A9 | {(C)} | © | |
| 138 | $8A | {-+ } | ┫ | 170 | $AA | {./} | ✔ | |
| 139 | $8B | {-.-} | ┳ | 171 | $AB | « | ||
| 140 | $8C | { '-} | ┗ | 172 | $AC | {CAT} | 🐱 | |
| 141 | $8D | {-' } | ┛ | 173 | $AD | {COIN} | 🪙 | |
| 142 | $8E | {-. } | ┓ | 174 | $AE | {(R)} | ® | |
| 143 | $8F | { .-} | ┏ | 175 | $AF | {STAR} | ★ | |
| 144 | $90 | { ''} | ╰ | 176 | $B0 | {DEG} | ° | |
| 145 | $91 | {'' } | ╯ | 177 | $B1 | { B'} | ▝* | |
| 146 | $92 | {.. } | ╮ | 178 | $B2 | {'B } | ▘* | |
| 147 | $93 | { ..} | ╭ | 179 | $B3 | {.B } | ▖* | |
| 148 | $94 | {---} | ━ | 180 | $B4 | { B.} | ▗* | |
| 149 | $95 | { : } | ┃ | 181 | $B5 | {'B'} | ▀* | |
| 150 | $96 | {-+-} | ╋ | 182 | $B6 | {.B'} | ▞* | |
| 151 | $97 | 🞄 | 183 | $B7 | {:B } | ▌* | ||
| 152 | $98 | ♣ | 184 | $B8 | ◥* | |||
| 153 | $99 | ♦ | 185 | $B9 | ◤* | |||
| 154 | $9A | ♥ | 186 | $BA | {NOTE} | ♫ | ||
| 155 | $9B | ♠ | 187 | $BB | » | |||
| 156 | $9C | {: :} | ░ | 188 | $BC | {FLAT} | ♭ | |
| 157 | $9D | {:::} | ▒ | 189 | $BD | {NAT} | ♮ | |
| 158 | $9E | {#:#} | ▓ | 190 | $BE | {SHARP} | ♯ | |
| 159 | $9F | {///} | ▨ | 191 | $BF | ¿ |
*Use the reversed theme ({REV}) to make the complementary shapes for these characters.
$C0-$FF International
| # | Hex | Escape | Unicode | # | Hex | Escape | Unicode | |
|---|---|---|---|---|---|---|---|---|
| 192 | $C0 | À | 224 | $E0 | à | |||
| 193 | $C1 | Á | 225 | $E1 | á | |||
| 194 | $C2 | Â | 226 | $E2 | â | |||
| 195 | $C3 | Ã | 227 | $E3 | ã | |||
| 196 | $C4 | Ä | 228 | $E4 | ä | |||
| 197 | $C5 | Å | 229 | $E5 | å | |||
| 198 | $C6 | Æ | 230 | $E6 | æ | |||
| 199 | $C7 | Ç | 231 | $E7 | ç | |||
| 200 | $C8 | È | 232 | $E8 | è | |||
| 201 | $C9 | É | 233 | $E9 | é | |||
| 202 | $CA | Ê | 234 | $EA | ê | |||
| 203 | $CB | Ë | 235 | $EB | ë | |||
| 204 | $CC | Ì | 236 | $EC | ì | |||
| 205 | $CD | Í | 237 | $ED | í | |||
| 206 | $CE | Î | 238 | $EE | î | |||
| 207 | $CF | Ï | 239 | $EF | ï | |||
| 208 | $D0 | Ð | 240 | $F0 | ð | |||
| 209 | $D1 | Ñ | 241 | $F1 | ñ | |||
| 210 | $D2 | Ò | 242 | $F2 | ò | |||
| 211 | $D3 | Ó | 243 | $F3 | ó | |||
| 212 | $D4 | Ô | 244 | $F4 | ô | |||
| 213 | $D5 | Õ | 245 | $F5 | õ | |||
| 214 | $D6 | Ö | 246 | $F6 | ö | |||
| 215 | $D7 | {X} | × | 247 | $F7 | {/} | ÷ | |
| 216 | $D8 | Ø | 248 | $F8 | ø | |||
| 217 | $D9 | Ù | 249 | $F9 | ù | |||
| 218 | $DA | Ú | 250 | $FA | ú | |||
| 219 | $DB | Û | 251 | $FB | û | |||
| 220 | $DC | Ü | 252 | $FC | ü | |||
| 221 | $DD | Ý | 253 | $FD | ý | |||
| 222 | $DE | Þ | 254 | $FE | þ | |||
| 223 | $DF | ß | 255 | $FF | ÿ |