program looplicht; uses wincrt;
const
	LPT1D=$3bc;
	LPT1S=LPT1D+1;
	vertraging=5000000;
var
	patroon1: array [1..8] of byte;
	patroon2: array [1..8] of byte;
	teller: integer;
	wacht: longint;
begin
	patroon1[1]:=$aa;
	patroon1[2]:=$33;
	patroon1[3]:=$55;
	patroon1[4]:=$cc;
	patroon1[5]:=$99;
	patroon1[6]:=$cc;
	patroon1[7]:=$66;
	patroon1[8]:=$33;
	patroon2[1]:=$81;
	patroon2[2]:=$81;
	patroon2[3]:=$42;
	patroon2[4]:=$24;
	patroon2[5]:=$18;
	patroon2[6]:=$18;
	patroon2[7]:=$24;
	patroon2[8]:=$42;
	teller:=1;
	while port[LPT1S] and $10 = $10 do
	begin
		if port[LPT1S] and $08 = $08
		then
			port[LPT1D]:=patroon2[teller]
		else
			port[LPT1D]:=patroon1[teller];
		wacht:=vertraging;
		repeat
			wacht:=wacht-1
		until wacht=0;
		teller:=teller+1;
		if teller>8
		then
			teller:=1
	end
end.
