nugget
Using the Default Applications
D-5
D
Using Display Control Codes
You can use control codes to position the cursor or to format the terminal display. The
EM9560.BIN
application recognizes the display control codes listed next.
Command Control Code Description or Action
Backspace
BS (08 Hex)
Moves the cursor one position to the left until
the cursor reaches the first column. If the
cursor is in the first column of any row
except the first row, a Backspace command
moves the cursor to the last column of the
previous row.
Cursor Position
ESC[
n
;
v
H
Moves the cursor to the position specified by
the
n
and
v
parameters where:
n
specifies the row or line number.
v
specifies the column number.
If you enter zero or no parameter,
n
and
v
are
set to one. If
n
or
v
exceeds the maximum
row or column number on the display, the
parameters are set to the screen’s maximum.
Erase Display
ESC[2J
Erases the entire display and returns the
cursor to the home position (row 1, column
1). This command also erases the entire
virtual display image (buffer with up to four
rows of the most recently displayed data).
Home
CR (0D Hex)
Returns the cursor to the first column of the
current row.
Next Line
LF (0A Hex)
Moves the cursor down one row in the
current column position. If the cursor is
already in the last row, a new line is added.
Restore Cursor
Position
ESC[u
Restores the cursor position saved with a
Save Cursor Position command. Each Restore
Cursor Position command must be paired
with a preceding Save Cursor Position
command. If a Save Cursor Position
command has not been previously entered,
the cursor position will not change.
Save Cursor
Position
ESC[s
Saves the current cursor position. Successive
Save Cursor Position commands overwrite
the previous position that was saved.