15 lines
642 B
Text
15 lines
642 B
Text
include c:\cxpl\codes; \intrinsic 'code' declarations
|
|
int X, Y;
|
|
[SetVid($101); \set 640x480 graphics with 8-bit color
|
|
port($3C8):= 0; \set color registers with beautiful shades
|
|
for X:= 0 to 256-1 do
|
|
[port($3C9):= X>>1; \red
|
|
port($3C9):= X>>3; \green
|
|
port($3C9):= X; \blue
|
|
];
|
|
for Y:= 0 to 256-1 do \"color table" is array of 256 registers
|
|
for X:= 0 to 256-1 do
|
|
Point(X, Y, X|Y); \"|" = XOR, not OR which is "!"
|
|
X:= ChIn(1); \wait for keystroke
|
|
SetVid(3); \restore normal text mode
|
|
]
|