program ScreenPattern;
var
@use "screen"

	i,time,j,k,m,x,y : byte=0;
	zp:pointer;


procedure FillScreenPattern();
begin
	while (true) do
	begin
		zp:=mode2_vram;
		j:=time;
		for i:=0 to 200 do
		begin
			for k:=0 to 160 do 
			begin
				Screen::PutPixelMode2(k,i, j&15);
				j:=(j+1);
			end;
			j:=(j+1);
		end;
	end;


end;


begin
	Screen::ResetStack();
	Screen::Init();
	Screen::SetMode2();
	Screen::SetPalette(#Screen::defaultPalette);	
	// Clear the screen
	Screen::FillBanks(#mode2_vram,00,$40);	
	// start filling stuff!
	while (true) do
	begin
		FillScreenPattern();	
		inc(time)
	end;

end.
