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
/
MBUG139.ARC
/
OR-TEST.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1979-12-31
|
2KB
|
69 lines
PROGRAM OR_TEST;{tests combining two pcg chars to create a third}
TYPE
pcg = array[0..10] of byte;
CONST
pcg_length = 11;
dot0_0 :pcg =(24,24,24,24,24,255,24,24,24,24,24);
dot0_1 :pcg =(255,129,129,129,129,129,129,129,129,129,255);
space :pcg =(0,0,0,0,0,0,0,0,0,0,0);
VAR
screen_ram : array[1..24,1..80] of byte absolute $F000;
pcg_ram : array[128..256,0..15] of byte absolute $F800;
pcg_stor_1 : array[0..10] of byte;
pcg_stor_2 : array[0..10] of byte;
pcg_stor_3 : array[0..10] of byte;
pcg_stor_4 : array[0..10] of byte;
pcg_stor_5 : array[0..10] of byte;
count, i, j : integer;
PROCEDURE TEST;
BEGIN
move(dot0_0[0],pcg_ram[128,0],pcg_length);
move(dot0_1[0],pcg_ram[129,0],pcg_length);
move(dot0_0[0],pcg_stor_1[0],pcg_length);
move(dot0_1[0],pcg_stor_2[0],pcg_length);
for count := 0 to 10 do
pcg_stor_3[count] := pcg_stor_1[count] or pcg_stor_2[count];
move(pcg_stor_3[0],pcg_ram[130,0],pcg_length);
gotoxy(1,10); write(chr(128));write(' or '); write(chr(129));
writeln(chr(130));
for count := 0 to 10 do
pcg_stor_3[count] := pcg_stor_1[count] and pcg_stor_2[count];
move(pcg_stor_3[0],pcg_ram[131,0],pcg_length);
write(chr(128));write(' and '); write(chr(129));
writeln(chr(131));
for count := 0 to 10 do
pcg_stor_3[count] := pcg_stor_1[count] xor pcg_stor_2[count];
move(pcg_stor_3[0],pcg_ram[132,0],pcg_length);
write(chr(128));write(' xor '); write(chr(129));
writeln(chr(132));
move(space[0],pcg_ram[131],pcg_length);
writeln('.',chr(130),'.',chr(131),'.',chr(132),'.');
for count := 0 to 10 do
pcg_stor_4[count] := pcg_ram[129,count] or pcg_ram[128,count];
move(pcg_stor_4[0],pcg_ram[133,0],pcg_length);
writeln(chr(133));
for count := 0 to 10 do
pcg_stor_5[count] :=
pcg_ram[screen_ram[10,1],count] or pcg_ram[screen_ram[10,7],count];
move(pcg_stor_5[0],pcg_ram[134,0],11);
writeln(chr(134));
{test to display the contents of screen RAM, rows 1 to 21, at row 22
for i := 1 to 21 do
begin
gotoxy(1,22); write('i : ');
for j := 1 to 80 do
begin
gotoxy(1,22); write(i,',',j,' : ',screen_ram[i,j]);
delay(4000); gotoxy(1,22); write(' ');
end;
end;}
END;
BEGIN
clrscr;
TEST;
END.