home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG013.ARC
/
COLOR.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1979-12-31
|
4KB
|
130 lines
program COLOR;
{ Simple colour demonstration program to
display the effect of changing the
intensities of the RGB guns on the
background colours
Developed for the MicroBee by Bob Burt }
const
space = ' ';
title = '*** Colour in Turbo Pascal ***';
red = 32; { Black on named background }
green = 64;
yellow = 96;
blue = 128;
magenta = 160;
cyan = 192;
white = 224;
white_on_black = 7;
white2_on_black = 23;
white2_on_red = 55;
white2_on_green = 87;
white2_on_yellow = 119;
white2_on_blue = 151;
white2_on_magenta = 183;
white2_on_cyan = 215;
red2_on_cyan = 212;
red2_on_white = 244;
red2_on_green = 84;
yellow_on_magenta = 166;
magenta_on_yellow = 101;
red_on_blue = 132;
blue_on_red = 33;
var
colour_ram : integer;
intensity : integer;
begin {main}
intensity := 78; {Colour RAM ON, RGB Guns FULL}
repeat
writeln(^G);
port[8] := intensity;
clrscr;
writeln(space,' ',title);
for colour_ram := -1888 to -1849 do
mem[colour_ram] := red;
for colour_ram := -1848 to -1809 do
mem[colour_ram] := green;
gotoxy(1,3);
writeln(space,'Black on Red ',space,'Black on Green');
for colour_ram := -1808 to -1769 do
mem[colour_ram] := yellow;
for colour_ram := -1768 to -1729 do
mem[colour_ram] := blue;
writeln(space,'Black on Yellow ',space,'Black on Blue');
for colour_ram := -1728 to -1689 do
mem[colour_ram] := magenta;
for colour_ram := -1688 to -1649 do
mem[colour_ram] := cyan;
writeln(space,'Black on Magenta ',space,'Black on Cyan');
for colour_ram := -1648 to -1609 do
mem[colour_ram] := white;
for colour_ram := -1608 to -1569 do
mem[colour_ram] := white_on_black;
writeln(space,'Black on White ',space,'White on Black');
for colour_ram := -1568 to -1529 do
mem[colour_ram] := white2_on_black;
for colour_ram := -1528 to -1489 do
mem[colour_ram] := white2_on_red;
writeln(space,'White2 on Black ',space,'White2 on Red');
for colour_ram := -1488 to -1449 do
mem[colour_ram] := white2_on_green;
for colour_ram := -1448 to -1409 do
mem[colour_ram] := white2_on_yellow;
writeln(space,'White2 on Green ',space,'White2 on Yellow');
for colour_ram := -1408 to -1369 do
mem[colour_ram] := white2_on_blue;
for colour_ram := -1368 to -1329 do
mem[colour_ram] := white2_on_magenta;
writeln(space,'White2 on Blue ',space,'White2 on Magenta');
for colour_ram := -1328 to -1289 do
mem[colour_ram] := white2_on_cyan;
for colour_ram := -1288 to -1249 do
mem[colour_ram] := red2_on_cyan;
writeln(space,'White2 on Cyan ',space,'Red2 on Cyan');
for colour_ram := -1248 to -1209 do
mem[colour_ram] := red2_on_white;
for colour_ram := -1208 to -1169 do
mem[colour_ram] := red2_on_green;
writeln(space,'Red2 on White ',space,'Red2 on Green');
for colour_ram := -1168 to -1129 do
mem[colour_ram] := yellow_on_magenta;
for colour_ram := -1128 to -1089 do
mem[colour_ram] := magenta_on_yellow;
writeln(space,'Yellow on Magenta',space,'Magenta on Yellow');
for colour_ram := -1088 to -1049 do
mem[colour_ram] := red_on_blue;
for colour_ram := -1048 to -1009 do
mem[colour_ram] := blue_on_red;
writeln(space,'Red on Blue ',space,'Blue on Red');
writeln; writeln;
writeln(space,' Default Colours - normally Green on Black');
writeln;
write(space,' ');
lowvideo;
write('Background Intensity : ');
case intensity of
78 : writeln('R G B Full, none Half');
76 : writeln('G B Full, R Half');
74 : writeln('R B Full, G Half');
72 : writeln('B Full, R G Half');
70 : writeln('R G Full, B Half');
68 : writeln('G Full, R B Half');
66 : writeln('R Full, G B Half');
64 : writeln('None Full, R G B Half')
end;
normvideo;
writeln;
writeln(space,'All change to Default Colours on Exiting Program');
writeln;
writeln(space,space,'Press any Key for Next Screen ..');
repeat until keypressed;
intensity := intensity - 2
until intensity = 62
end.{main}