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
/
COLOR2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1979-12-31
|
3KB
|
80 lines
program COLOR2;
{ Demonstration of the use of the procedure
FillChar to place the colour values for
MicroBee Colour Computers into the Colour
RAM and providing a visual demonstration
of the effect of changing the intensities
of the Red, Green and Blue colour guns on
the background colours.
Program designed by Bob Burt }
const
black = 7; {black background, white foreground}
red = 39; {red background, white foreground}
green = 64; {green background, black foreground}
yellow = 100; {yellow background, red foreground}
blue = 135; {blue background, white foreground}
magenta = 160; {magenta background, black foreground}
cyan = 192; {cyan background, black foreground}
white = 224; {white background, black foreground}
var
colour_ram : byte absolute $F800;
intensity : byte;
begin {main}
intensity := 78; {R G B Guns Full, Colour RAM ON}
repeat
port[8] := intensity;
clrscr;
gotoxy(12,2);
lowvideo;
writeln('*** Effect of Changing Intensity on Background Colours ***');
gotoxy(19,14);
write(' Background Intensity : ');
case intensity of
78 : write('R G B Full, none Half ');
76 : write('G B Full, R Half ');
74 : write('R B Full, G Half ');
72 : write('B Full, R G Half ');
70 : write('R G Full, B Half ');
68 : write('G Full, R B Half ');
66 : write('R Full, G B Half ');
64 : write('None Full, R G B Half ');
end; {case intensity}
normvideo;
gotoxy(19,14); {Hide cursor}
fillchar(colour_ram,1920,red);
delay(1000);
fillchar(colour_ram,1680,green);
delay(1000);
fillchar(colour_ram,1440,yellow);
delay(1000);
fillchar(colour_ram,1200,blue);
delay(1000);
fillchar(colour_ram,960,magenta);
delay(1000);
fillchar(colour_ram,720,cyan);
delay(1000);
fillchar(colour_ram,480,white);
delay(1000);
fillchar(colour_ram,240,black);
delay(1000);
if intensity > 64 then
begin
gotoxy(23,8);
lowvideo;
write(' Press any key for next display');
normvideo;
repeat until keypressed
end; {if intensity}
intensity := intensity - 2
until intensity = 62;
gotoxy(25,20);
lowvideo;
write(^G,' Press any key to return to CP/M');
normvideo;
repeat until keypressed
end. {main}