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