Skip to main content

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:

  1. 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 so console::print() simply ignores them.
  2. As special keyboard keys: The console::read_key() function returns control codes for certain non-printing keyboard keys such as the arrow keys, the ENTER key, or the ESC key.
  3. 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.
HexEscapeNameKeyDescription
$00null(unused ASCII)
Hybrix strings don't normally contain null bytes.
$01{reset}resetaction: disable the modes for scroll off, reverse, and matte
keyboard shortcut: SHIFT + ESC
$02{soff}scroll offaction: 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 upaction: scroll the screen contents upwards
keyboard shortcut: CTRL + C
$04{sdown}scroll downaction: scroll the screen contents downwards
keyboard shortcut: CTRL + D
$05{cls}clear screenaction: erase the screen by filling with space characters
keyboard shortcut: CTRL + BACKSPACE
Apple keyboards: CTRL + DELETE
$06{cll}clear lineaction: erase the current line by filling with space characters
keyboard shortcut: CTRL + SHIFT + BACKSPACE
Apple keyboards: CTRL + SHIFT + DELETE
$07bell(unused ASCII)
$08backspaceBACKSPACE(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}tabTABaction: move the cursor rightwards to the next tab stop
$0a{n}newline
(LF)
ENTERaction: move to the first column of the next line (ASCII "line feed")
Apple keyboards: RETURN ( ⏎ )
$0b{home}homeHOMEaction: move to the first column of the top line
Apple keyboards: FN + LEFT
$0c{end}endENDaction: move to the first column of the bottom line
Apple keyboards: FN + RIGHT
$0d{cr}CRaction: 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}reverseaction: 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}matteenable matte coloring mode, which changes color #0 (Clear) to be io::matte_color
keyboard shortcut: CTRL + .
$10{0}blackaction: change the text color*
$11{1}whiteaction: change the text color*
$12{2}redaction: change the text color*
$13{3}orangeaction: change the text color*
$14{4}yellowaction: change the text color*
$15{5}greenaction: change the text color*
$16{6}cyanaction: change the text color*
$17{7}blueaction: change the text color*
$18{8}purpleaction: change the text color*
$19{9}violetaction: change the text color*
$1a{meta}metaunimplemented 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 keyESC(not printable)
modern programs typically use this keyboard key to "go back" to a previous menu or state
$1c{u}cursor upUPaction: move the cursor up by one line
$1d{d}cursor downDOWNaction: move the cursor down by one line
$1e{l}cursor leftLEFTaction: move the cursor left by one column
$1f{r}cursor rightRIGHTaction: 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

#HexEscapeName#HexEscapeUnicode
0$00null32$20space
1$01{reset}reset33$21!
2$02{soff}scroll off34$22{quote}"
3$03{sup}scroll up35$23#
4$04{sdown}scroll down36$24$
5$05{cls}clear screen37$25%
6$06{cll}clear line38$26&
7$07bell39$27'
8$08backspace40$28(
9$09{tab}tab41$29)
10$0a{n}newline (LF)42$2a*
11$0b{home}home43$2b+
12$0c{end}end44$2c,
13$0d{cr}CR45$2d-
14$0e{rev}reverse46$2e.
15$0f{mat}matte47$2f/
16$10{0}black48$300
17$11{1}white49$311
18$12{2}red50$322
19$13{3}orange51$333
20$14{4}yellow52$344
21$15{5}green53$355
22$16{6}cyan54$366
23$17{7}blue55$377
24$18{8}purple56$388
25$19{9}violet57$399
26$1a{meta}meta58$3a:
27$1b{esc}escape key59$3b;
28$1c{u}cursor up60$3c<
29$1d{d}cursor down61$3d=
30$1e{l}cursor left62$3e>
31$1f{r}cursor right63$3f?

$40-$7F Alphabet

#HexEscapeUnicode#HexEscapeUnicode
64$40@96$60`
65$41A97$61a
66$42B98$62b
67$43C99$63c
68$44D100$64d
69$45E101$65e
70$46F102$66f
71$47G103$67g
72$48H104$68h
73$49I105$69i
74$4aJ106$6aj
75$4bK107$6bk
76$4cL108$6cl
77$4dM109$6dm
78$4eN110$6en
79$4fO111$6fo
80$50P112$70p
81$51Q113$71q
82$52R114$72r
83$53S115$73s
84$54T116$74t
85$55U117$75u
86$56V118$76v
87$57W119$77w
88$58X120$78x
89$59Y121$79y
90$5aZ122$7az
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

#HexEscapeUnicode#HexEscapeUnicode
128$80{-->}🠞160$a0{euro}
129$81{ ^ }🠝161$a1¡
130$82{<--}🠜162$a2{cent}¢
131$83{ v }🠟163$a3{pound}£
132$84164$a4{[ ]}
133$85165$a5{[./]}
134$86166$a6{( )}
135$87167$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$98184$b8*
153$99185$b9*
154$9a186$ba{note}
155$9b187$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

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