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
/
COLOR4.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1979-12-31
|
2KB
|
78 lines
program COLOR4;
{ Colour for MicroBee in Turbo Pascal using an initialising
procedure to intercept the call to BDOS to allow insert
of a routine to form a scratch area (SCRTCH) to place the
values for foreground, background and intensity, so that
responses to a change in colour values apply only when
characters are written to screen.
Procedures developed by Bob and Alan Burt }
var
col_ram : integer;
intensity : byte;
{$I colinit2.pro}
{$I flash.pro}
procedure color(foreground, background, intensity : byte);
begin
mem[addr(init)+45] := background*32+foreground;{value in SCRTCH of init}
mem[addr(init)+46] := intensity*2 {place in SCRTCH + 1 of init}
end; {procedure color}
begin {main}
init; {must be called ONCE in each program}
clrscr;
intensity := 0;
write(^G);
gotoxy(35,10);
write('Intensity value of ',intensity);
gotoxy(1,4);
color(0,7,intensity);
write('This is Black on White ');
delay(1000);
gotoxy(1,6);
color(4,3,intensity);
write('This is Red on Yellow ');
delay(1000);
gotoxy(1,8);
color(21,6,intensity);
write('This is Magenta II on Cyan ');
delay(1000);
gotoxy(1,10);
color(23,2,intensity);
write('This is White II on Green ');
delay(1000);
gotoxy(1,12);
color(7,4,intensity);
write('This is White on Blue ');
delay(1000);
gotoxy(1,14);
color(6,6,intensity);
write('This is Yellow on Cyan ');
delay(1000);
gotoxy(1,16);
color(2,3,intensity);
write('This is Green on Yellow ');
delay(1000);
gotoxy(1,18);
color(1,3,intensity);
write('This is Blue on Yellow ');
delay(1000);
gotoxy(1,20);
color(5,7,intensity);
write('This is Magenta on White ');
delay(3000);
for intensity := 1 to 7 do
begin
color(0,7,intensity);
gotoxy(35,10);
write('Intensity value of ',intensity);
write(^G);
delay(3000)
end;
flash
end. {main}