COLOR
Format: COLOR (X)
Supported by: COMX BASIC V1.00
Similar commands:
Floating Point BASIC 2.2: COLOR
Telmac SBASIC v 24.3: COLOR
Pecom 32 BASIC, Pecom 64 BASIC 1.0 and 4.0: COLOR
The COMX-35 screen display is multi-coloured. The keyboard input of the user is displayed (or echoed) in white, and the computer output and error messages are in cyan (a light blue). The diamond shaped cursor is in magenta (pinkish). The overall effect is to increase readability, and to facilitate "dialogue" between the user and the computer and generally enable the user to program faster with fewer errors. These features are especially important for first time users. The colour combination described above is the "default" scheme, i.e. it is the scheme normally used by COMX-35 unless it is specifically instructed to use other colours. Other colour schemes are possible through the use of the COLOR, SCREEN and CTONE commands.
The COLOR command is in the format, COLOR (X), where X is a numeric expression which determines the colour combination to be used for user input and computer output characters. The colour combinations for different values of X are given in table 1 below.
Now, try the command
COLOR (10)
followed by pressing CR, and note that user input characters have turned magenta and the computer outputs have turned blue. Try some other commands with the "10" replaced by any number from 1 to 12 inclusive. Observe the colour changes and compare them with table 1 below. Note that COLOR (12) corresponds to the default character colours.
X |
COMPUTER RESPONSE |
KEYBOARD INPUT |
||
1 |
BLACK |
(0) |
GREEN |
(59) |
2 |
RED |
(30) |
YELLOW |
(89) |
3 |
BLUE |
(11) |
CYAN |
(70) |
4 |
MAGENTA |
(41) |
WHITE |
(100) |
5 |
BLACK |
(0) |
BLUE |
(11) |
6 |
RED |
(30) |
MAGENTA |
(41) |
7 |
GREEN |
(59) |
CYAN |
(70) |
8 |
YELLOW |
(89) |
WHITE |
(100) |
9 |
BLACK |
(0) |
RED |
(30) |
10 |
BLUE |
(11) |
MAGENTA |
(41) |
11 |
GREEN |
(59) |
YELLOW |
(89) |
12 |
CYAN |
(70) |
WHITE |
(100) |
Table 1: Colour Schemes for COLOR (X)
NOTE: The bracketed numbers are the luminances in %.
The COLOR command is performing the following logic: The X value is actually mapped to CCB0/CCB1 (by writing character RAM, i.e. 'shaping' all main characters) and COLB1/COLB0 (OUT 3, bit 5/6) of the CDP1870. See also the Video Interface System page and table 2 below.
C0LB1 |
COLBO |
RED |
BLUE |
GREEN |
X |
0 |
0 |
CCBO |
CCB1 |
PCB |
1 to 4 |
0 |
1 |
CCBO |
PCB |
CCB1 |
5 to 8 |
1 |
0 |
PCB |
CCBO |
CCB1 |
9 to 12 |
1 |
1 |
PCB |
CCBO |
CCB1 |
|
Table 2: COLB1/COLB0 to X mapping