program XYKoe(output, input);
  var x, y: integer;

{kursorin ohjausta ja ruudun tyhjennystä Sun/Sparcissa}

{----------------------------------------------------------}
{Siirtaa kursorin naytolla kohtaan (x,y)}

procedure gotoxy(x,y:integer);
begin
     write (chr(27),'[',y:1,';',x:1,'H');
end;
{----------------------------------------------------------}
{ Tyhjaa nayton}

Procedure clrscr;
begin
     write(chr(27),'[2J');
     gotoxy(1,1);
end;
{----------------------------------------------------------}
begin { testipääohjelma }
  clrscr;
  for x:=1 to 10 do
    for y := x to 10 do 
      begin
        gotoxy(x,y);
        write('*')
      end;
  writeln;
  writeln('OK?');
  readln;
  clrscr;
end.

