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 | ÿ |