program Tutorial1;
@use "Screen"
var
	py,y,time : byte;
	
	msg : string=("HELLO APPLE II WORLD FROM TRSE"); 
	
	sin : array[$100] of byte = buildsinetable(24);



begin
	
	while(true) do
	begin
		// Increase the counter, calculate y
		py:=y;
		y:=sin[time];	
		time+=1;
		// Only clear screen if y pos has changed
		if (y<>py) then
			Screen::Clear($20, #Screen::screen_loc);
		// Print the text
		Screen::PrintText(4,y, #msg, sizeof(msg));			
		// Wait for vertical blank!
		Screen::WaitForVBlank();
	end;
end.

