A-2 Use
of
the
ESCAPE
Code Control Sequences
Where numeric codes must be given from the keyboard (shown as n
or
m in
the escape sequence - these are ASCII codes) the key
or
key combination giv-
ing
that
code can be found in the table in Appendix E. Some sequences cannot
be obtained direct from the keyboard. Also some control codes (e.g. CTRL-M
which
is
equivalent
to
pressing the
RETURN
key) will function normally
and
so terminate the input.
Example 1 ESC control sequence from the
CP
1M
command line
The following example shows how
to
turn
the cursor
off
and then back
on
again
on
the
CP
1M
command line.
Press the ESC key followed by the number
"2"
then press the
RETURN
key.
The display will show:
A>"[2
RETURN
?
A>
with no cursor after the
CP
1M
prompt.
To
make the cursor display return,
type the ESC key followed by the number
"3".
The question
mark
in either
case means
CP/M
does
not
understand the command.
Example 2 The Use
of
the
CONOUT
routine
The
CONOUT
routine (section 5.7.3) be used
to
execute the console ESC se-
quences, for example
to
change the cursor
to
non
flashing.
LD
C.IBH
CALL
CONOUT
LD
C. D6H
CALL
CONOUT
LD
C.
OlH
CALL
CONOUT
A-4
~
.~~
~
r~~
.-
~
..-.
-
.'"
~
....
'1/'J1
~
~)
.,
~
~,
~
·1
,.~
~
~~
~
~"
~
"J
.-.""
~
'''I!?
~~
;~
"'J
A-3 The ESC Sequences
ESC "070"
Reads the character corresponding to the specified code from the character gener-
ator
ROM
and
displays
it
at
the present cursor position in the currently select-
ed screen (in the virtual screen for modes 0,
1,
and
2,
and
in the real Screen
for mode 3). The sequence
is
as follows:
Keyboard ESC,
OJo,n
Decimal 27,37,n
Hexadecimal IB,25,n
The value
of
n
is
the ASCII code corresponding
to
the character
to
be displayed.
This code cannot be obtained directly from the keyboard.
ESC"
*"
Clears the currently selected screen
and
moves the cursor
to
the home position.
The
I CLR I key
or
I CTRL I - [iJ performs the same function.
Keyboard ESC, *
Decimal 27,42
Hexadecimal IB,2A
ESC
"2"
Turns
off
display
of
the cursor. However, the cursor is still present even though
it cannot actually
be
seen.
Keyboard ESC,2
Decimal 27,50
Hexadecimal IB,32
The cursor
can
also be turned
on
and
off
by using the
CONFIG
program.
ESC
"3"
Turns
on
the cursor.
Keyboard ESC,3
Decimal 27,51
Hexadecimal IB,53
A-S
l