program joy;

USES Hardware;

CONST
	n : Integer = 0;
	fire  = $0080;
	right = $0002;
	left  = $0200;
	down  = $0001;
	up    = $0100;

VAR
	dat : Word;

Begin
	dat := 0;
	While n < 10 do begin
		inc(n);
		
		{Writeln('joy0dat : ',Custom^.joy0dat);}
		{Writeln('joy1dat : ',Custom^.joy1dat);}
		{Writeln('joytest : ',Custom^.joytest);}
		
		dat := Custom^.joy1dat;
		writeln(dat);
		
		{if dat and fire <> 0 then Writeln('FIRE');
		if dat and right <> 0 then Writeln('RIGHT');
		if dat and left <> 0 then Writeln('LEFT');
		if dat and down <> 0 then Writeln('DOWN');
		if dat and up <> 0 then Writeln('UP');}
		
	end;
end.