program Terminal;

          {ษอออออออออออออออออออออออออออออออออออออออออออออออออออออออออป}
          {บ                                                         บ}
          {บ  Hlavni program pro TERMINAL                            บ}
          {บ                                                         บ}
          {บ                                                         บ}
          {ศอออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ}

{$I Sets.inc}


uses
{$ifdef DebGraph}
  Graph,
  GraphWin,
{$endif}
{$ifdef Deb_Crt}
  Crt,
  CrtWin,
{$endif}
{$ifdef Tick}
  Tick,
{$endif}
  uMAke,
  Kernel,        { operacni system ReTOS }
  ProcMenu,      { aplikacni menu }
  uInit,         { Inicializace promenych a HW }
  G240X128,
  LocGlb,
  uNMInt,
  uExit;         { Ukonceni programu }

const
    ZapTimeInt             :integer = 0;
    PostupCar              :integer = 0;

var DifX,DifLastX          :integer;
    ValInteger,Valinteger1 :integer;


{------------------hlavni program----------------------------}
begin
  Init;   {inicializace bez OS Retos}

  InitGlb;

  StartMain(200,0);
  InitInterruptStack(1,254);
  StartTimeSlicing(8);

{$ifdef Tick}
  InitTick{I};
  SetTickDivider(5);
{$endif}

{$ifdef DebGraph}
  GraphInit;
{$endif}

{$ifdef Deb_Crt}
  CrtInit;
{$endif}


  UserMenu;     { spusteni uzivatelskeho menu}

{$ifdef Deb}
  pDeb;
{$endif}

{$ifdef Komunikuj}
  pKomunik;
{$endif}

  SetPriority(1,254);

  repeat
  until FlEnd;

  Abort('*');
  TerminateMain;
  DestructKomunikace;
  Exit;   { ukonceni programu a HW }
end.
