
program NoName;
{$MODE delphi}{$H+}

uses
{$ifdef unix}
  cthreads,
  cmem, // the c memory manager is on some systems much faster for multi-threading
{$endif}
 //heaptrc, lineinfo,
 Interfaces, // this includes the LCL widgetset
 Classes,SysUtils,Forms,
 base2,BASini,MyThread,datalist,BASICunit;
{$MAXFPUREGISTERS 0}
{$IFNDEF Darwin}{$R *.res}{$ENDIF}
begin
 //SetHeapTraceOutput('trace.log');
 Application.Initialize;
 init;
 BASICThread0:=TBASICFirstThread.Create(FirstThreadPriority,SystemStackSize);
 BASICThread0.start;
 (TThread.CurrentThread).Yield;
 sleep(DrawStartDelay);
 Application.ProcessMessages;
 repeat
     MainTask;
 until StopRequest or AllThreadsList.finished;
 if StopRequest then
      begin
        AllThreadsList.suspend;
        AllChannelList.FreeAll;
        AllThreadsList.kill;
      end;
 sleep(10);
 MainTask;
 Finish;
 Application.Run;
 end.
