Mixing Colors - Radio Shack TRS-80 CGP-220 Operation Manual

Table of Contents

Advertisement

----------------------------------------------
28
10 LPRINT CHR$(27);CHR$(67);:REM ENTERING COLOR-SCAN MODE
20 LPRINT CHR$(3);:REM PRINTS THREE ROWS
30 LPRINT CHR$O28);CHR$(128);CHR$(128);:REM RED DATA-
LEFTMOST DOT ON EACH OF THE THREE ROWS
40 LPRINT CHR$(16);CHR$(16);CHR$C16);:REM GREEN DATA-4TH
DOT FROM LEFT ON EACH OF THE THREE ROWS
50 LPRINT CHR$(1);CHR$C1);CHR$(1);:REM BLUE DATA-RIGHTMOST
DOT ON EACH OF THE THREE ROWS
This program will print a red dot on the leftmost position on each dot-row, a green dot
on the fourth position from the left, and a blue dot on the rightmost position, and all
the other dots will be black.
Mixing Colors
The CGP-220 lets you mix any two colors to obtain a third color. Simply specify the
color data so the same dot will be printed in the two desired colors.
The chart below shows you what color you can expect when you mix any two colors:
Red
+
Green
=
Yell ow
Red
+
Blue
=
Magenta
Green
+
Blue
=
Violet
If you want to leave a dot "white," simply specify all three colors.
Type the following lines to modify the previous program:
30 LPRINT CHR$(195);CHR$(195);CHR$(195);
40 LPRINT CHR$(51);CHR$C51);CHR$(51);
50 LPRINT CHR$(60);CHR$(60);CHR$C60);
The program will print each of the three dot-rows as:
red - red - violet - violet - blue - blue - yellow - yellow
Line 30, the Red data, uses Dot #s 128, 64, 2 and 1 to add up to 195.
Line 40, the Green data, uses Dot #s 32, 16, 2, and 1 to add up to 51.
Line 50, the Blue data, uses Dot #s 32, 16, 8 and 4 to add up to 60.
Let's analyze what happens when the program is run and the pattern is printed:
Dot #s 128 and 64 have Red data only.
Dot #s 32, and 16 have both Green and Blue data
Dot #s 8, and 4 have Blue data only.
Dot #s 2, and 1 have both Red and Green data.
Refer to the Color Chart. You will see that because Dot #s 32, and 16 have both
Green and Blue, they should appear as Violet. Also, since Dot #s 2, and 1 have both
Red and Green Data, they should appear as yellow.
Note: If you send more data to the CGP-220 than specified, the excess data will be
processed in the Mode previous to entering the Color-Scan Mode, either Text or Bit
Image. Also, note that in the Color-scan Mode the Dot Pitch is fixed to 1: 1.

Advertisement

Table of Contents
loading

Table of Contents