1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
INIT
UTF8 0
WANTPARSER
!Basic text
PUSH "hello"
text 0x68, 0x65, 0x6c, 0x6c, 0x6f
!C0
PUSH "\x03"
control 3
PUSH "\x1f"
control 0x1f
!C1 8bit
PUSH "\x83"
control 0x83
PUSH "\x9f"
control 0x9f
!C1 7bit
PUSH "\e\x43"
control 0x83
PUSH "\e\x5f"
control 0x9f
!High bytes
PUSH "\xa0\xcc\xfe"
text 0xa0, 0xcc, 0xfe
!Mixed
PUSH "1\n2"
text 0x31
control 10
text 0x32
!Escape
PUSH "\e="
escape "="
!Escape 2-byte
PUSH "\e(X"
escape "(X"
!Split write Escape
PUSH "\e("
PUSH "Y"
escape "(Y"
!Escape cancels Escape, starts another
PUSH "\e(\e)Z"
escape ")Z"
!CAN cancels Escape, returns to normal mode
PUSH "\e(\x{18}AB"
text 0x41, 0x42
!C0 in Escape interrupts and continues
PUSH "\e(\nX"
control 10
escape "(X"
!CSI 0 args
PUSH "\e[a"
csi 0x61 *
!CSI 1 arg
PUSH "\e[9b"
csi 0x62 9
!CSI 2 args
PUSH "\e[3;4c"
csi 0x63 3,4
!CSI 1 arg 1 sub
PUSH "\e[1:2c"
csi 0x63 1+,2
!CSI many digits
PUSH "\e[678d"
csi 0x64 678
!CSI leading zero
PUSH "\e[007e"
csi 0x65 7
!CSI qmark
PUSH "\e[?2;7f"
csi 0x66 L=3f 2,7
!CSI greater
PUSH "\e[>c"
csi 0x63 L=3e *
!CSI SP
PUSH "\e[12 q"
csi 0x71 12 I=20
!Mixed CSI
PUSH "A\e[8mB"
text 0x41
csi 0x6d 8
text 0x42
!Split write
PUSH "\e"
PUSH "[a"
csi 0x61 *
PUSH "foo\e["
text 0x66, 0x6f, 0x6f
PUSH "4b"
csi 0x62 4
PUSH "\e[12;"
PUSH "3c"
csi 0x63 12,3
!Escape cancels CSI, starts Escape
PUSH "\e[123\e9"
escape "9"
!CAN cancels CSI, returns to normal mode
PUSH "\e[12\x{18}AB"
text 0x41, 0x42
!C0 in Escape interrupts and continues
PUSH "\e[12\n;3X"
control 10
csi 0x58 12,3
!OSC BEL
PUSH "\e]1;Hello\x07"
osc "1;Hello"
!OSC ST (7bit)
PUSH "\e]1;Hello\e\\"
osc "1;Hello"
!OSC ST (8bit)
PUSH "\x{9d}1;Hello\x9c"
osc "1;Hello"
!Escape cancels OSC, starts Escape
PUSH "\e]Something\e9"
escape "9"
!CAN cancels OSC, returns to normal mode
PUSH "\e]12\x{18}AB"
text 0x41, 0x42
!C0 in OSC interrupts and continues
PUSH "\e]2;\nBye\x07"
control 10
osc "2;Bye"
!DCS BEL
PUSH "\ePHello\x07"
dcs "Hello"
!DCS ST (7bit)
PUSH "\ePHello\e\\"
dcs "Hello"
!DCS ST (8bit)
PUSH "\x{90}Hello\x9c"
dcs "Hello"
!Escape cancels DCS, starts Escape
PUSH "\ePSomething\e9"
escape "9"
!CAN cancels DCS, returns to normal mode
PUSH "\eP12\x{18}AB"
text 0x41, 0x42
!C0 in OSC interrupts and continues
PUSH "\ePBy\ne\x07"
control 10
dcs "Bye"
!NUL ignored
PUSH "\x{00}"
!NUL ignored within CSI
PUSH "\e[12\x{00}3m"
csi 0x6d 123
!DEL ignored
PUSH "\x{7f}"
!DEL ignored within CSI
PUSH "\e[12\x{7f}3m"
csi 0x6d 123
!DEL inside text"
PUSH "AB\x{7f}C"
text 0x41,0x42
text 0x43
|