{$N-}                           {Coprocessor off}
Uses Crt,Tools;

Var phi,                        {Angle}
    x,y:Word;                   {Coordinates}
    Character:Byte;             {Used character}
    Sine:Array[1..360] of Word; {receives the sine table}

Procedure Sine_Real;            {draws a circle 26 times}
Begin
  For Character:=Ord('A') to Ord('Z')do         {26 passes}
    For phi:=1 to 360 do Begin
      x:=Trunc(Round(Sin(phi/180*pi)*20+40)); {calculate x-coordinate}
      y:=Trunc(Round(Cos(phi/180*pi)*10+12)); {calculate y-coordinate}
      mem[$b800:y*160+x*2]:=Character;        {characters on the screen}
    End;
End;
Procedure Sine_new;             {draws a circle 26 times}
Begin
  For Character:=Ord('A') to Ord('Z')do       {26 passes}
    For phi:=1 to 360 do Begin
      x:=Sine[phi]+40;          {calculate x-coordinate}
      If phi<=270 Then          {calculate y-coordinate}
        y:=Sine[phi+90] div 2 + 12 Else       {Cosine as shifted sine}
        y:=Sine[phi-270] div 2 + 12;
      mem[$b800:y*160+x*2]:=Character;        {characters on the screen}
    End;
End;

Begin
  Sin_Gen(Sine,360,20,0);       {prepare sine table}
  ClrScr;                       {clear screen}
  Sine_real;                    {draw circles}
  ClrScr;                       {clear screen}
  Sine_new;                     {draw circles}
End.
