program spirale2;
{Name: Stefan Ziegler}
{Programm zeichnet Spirale}
uses crt, graph, drivers;

var i, s, t, e, f, w, b    : integer;
    graphdriver, graphmode : integer;
    c                      : real;
    a, mouseintflag        : byte;

procedure stop;
  begin
    c:=i mod 10;
    if c=0 then b:=b-1;
  end;

procedure movepress;
  begin
    if a=1 then exit;
    if MouseIntFlag=229 then a:=1;
    if keypressed then a:=1;
  end;

procedure spir;
  begin
    setcolor(13);
    s:=10; t:=0; e:=0; f:=0; b:=24;
    cleardevice;
    for i:=1 to 240 do
      begin
        arc(round(getmaxx/2), round(getmaxy/2), s,t,i);
        s:=t+24; t:=t+50+0;
        if keypressed then exit;
        c:=i mod 10;
        if c=0 then b:=b-1;
        delay(b);
      end;
  end;

begin
  a:=0;
  graphdriver:=9; graphmode:=2;
  initgraph(graphdriver,graphmode,'d:\tp\bgi ');
  mouseintflag:=0;
  repeat
    spir;
  until keypressed;
  readln;
  closegraph;
end.