User manual

Instruction set
4
3. Instruction set
All instructions follow a basic scheme compatible with ANSI escape sequences. A sequence
starts with an introductory character (hexcode 0x1B), in the following written as ESC,
and is completed by either a upper- or lowercase basic latin letter (A-Z, a-z) representing
a function code. Arguments to these functions are written as decimal integer numbers,
separated by semi-colon, between ESC and the function code.
All printable ASCII codes that are not part of an active escape sequence are shown on the
display. The text cursor advances automatically.
3.1. Text functions
Text functions are used to control the output position of characters to be printed, erase the
display or parts of it, scroll the display's content and toggle different modes of operation
such as inverse presentation. Here is a list of all textual functions.
Command Description Example LUA string
Text cursor functions
A Move text cursor n lines up. If n is
omitted, one line is moved up.
ESC[A ESC[2A "\27[2A"
B Move text cursor n lines down. If n is
omitted, one line is moved down.
ESC[B ESC[2B "\27[2B"
C Move text cursor n columns left. If n is
omitted, one column is moved left.
ESC[C ESC[12C "\27[12C"
D Move text cursor n columns right. If n
is omitted, one column is moved right.
ESC[D ESC[20D "\27[20D"
a Set text cursor to line n. If n is
omitted, cursor is set to the first line.
ESC[a ESC[2a "\27[2a"
b Set text cursor to column n. If n is
omitted, cursor is set to the first
column.
ESC[b ESC[5b "\27[5b"
H, f Set cursor to position [y; x]. If
parameters are omitted, cursor is set
to [1; 1].
ESC[H ESC[2;12f "\27[2;12H"
s Save current cursor position. ESC[s "\27[s"
u Restore previously saved cursor
position
ESC[u "\27[u"
Mode settings
l Disable mode n. Supported modes
are: 1, 2, 3, 8, 25, 75. See Table3.2,
“Options” for details.
ESC[?2l ESC[?25l "\27[?2l"
h Enable mode n. Supported modes
are: 1, 2, 3, 8, 25, 75. See Table3.2,
“Options” for details.
ESC[?2h ESC[?25h "\27[?2h"
Display clear functions