Changes

CP/M 3.0

701 bytes added, 14:13, 15 December 2019
/* Console Output/Terminal emulation */
ESC 1 - enable status line
ESC 2 - set language
ESC 3 - set screen mode?
ESC A - cursor up
ESC B - cursor down
PCW and Spectrum support viewports. This is not supported on CPC. CPC assumes a single viewport covering the entire screen and it is moved up/down using software when using insert line or delete current, but moved up using hardware otherwise.
 
==== ESC 2 - set language ===
 
ESC 2 <language>
 
<language> is 0 based. The value is anded with 7. Internally this will transfer language specific character graphics into the font for display.
 
 
==== ESC 3 - set display mode ====
 
Set the display mode:
 
ESC 3 <mode number>
 
<mode number> is 0 based. The value is anded with 3.
 
e.g. to set mode 0:
 
ESC,3,0
 
==== ESC b - set foreground ====
 
Set the foreground (pen 1) colour:
 
ESC b <colour>
 
Colour is 0 based with 32 added. It is a 2 bits per pixel %00rrggbb colour.
 
==== ESC c - set background ====
 
Set the background (pen 0 and border) colour:
 
ESC c <colour>
 
Colour is 0 based with 32 added. It is a 2 bits per pixel %00rrggbb colour.
Set the cursor position:
ESC Y <y> <x>
Coordinates are relative to top-left and are 0 based with 32 added.
e.g. for x,y of 2,10:
ESC,'Y',10+32,2+32
=== Memory layout ===
2,562
edits