CP/M-86 terminal emulation

The CP/M-86 terminal emulator uses a superset of VT52 codes:

ESC 0
disable the status line (containing the clock).
ESC 1
enable the status line.
ESC A
cursor up, unless at the top
ESC B
cursor down, unless at the bottom
ESC C
cursor right, unless at the right-hand edge
ESC D
cursor left, unless at the left-hand edge
ESC E
clear screen and home cursor
ESC H
home cursor
ESC I
cursor up, scroll down if at top
ESC J
delete to end of screen
ESC K
delete to end of line
ESC L
insert a line, moving current line and all lines below down by 1
ESC M
delete current line, moving all lines below up by 1
ESC N
delete character at cursor position, moving all characters right of it one character to the left
ESC Y r c
Move cursor to row r-32, column c-32
ESC a m
Select screen mode m
ESC b c
Set foreground colour c
ESC c c
Set background colour c
ESC d h l
Redirect CONIN
ESC e h l
Redirect CONOUT
ESC f h l
Redirect AUXIN
ESC g h l
Redirect AUXOUT
ESC h h l
Redirect LST

All redirections combine h and l to form a device number:

                 0, 1 = CRT
                 2,3  = COM1-2
                 4,5,6= LPT1-3
                 7    = CRT
                 8    = light pen
                 9,10 = CRT
	
ESC j
Save cursor position
ESC k
Restore cursor position
ESC l
Erase all characters on the current line
ESC m
Enable cursor
ESC n
Disable cursor
ESC o
Erase characters up to the cursor position
ESC p
Select black text on white background
ESC q
Select white text on black background
ESC r
Select bright text
ESC s
Select flashing text
ESC t
Cancel flashing text
ESC u
Cancel bright text
ESC v
Allow wrapping at end of line
ESC w
Do not wrap at end of line
ESC x
Mode MONO
ESC y
Mode CO80
ESC / bh bl
Call INT 10h, function 0Bh. ie:
ESC : scancode 0-terminated ASCII
Redefine a function key.

John Elliott 15-11-1998