Ignore:
Timestamp:
Jul 12, 2022, 11:51:47 PM (22 months ago)
Author:
chronos
Message:
  • Modified: Execute instructions as array of instruction handlers.
  • Modified: Optimized some methods call with inline directive.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UltimatOS/Forms/UFormMain.pas

    r32 r34  
    1818    ButtonRestart: TButton;
    1919    Label1: TLabel;
     20    Label2: TLabel;
    2021    MemoCode: TMemo;
    2122    PaintBox1: TPaintBox;
    2223    Timer1: TTimer;
     24    Timer2: TTimer;
    2325    procedure ButtonCompileClick(Sender: TObject);
    2426    procedure ButtonMemoryClick(Sender: TObject);
     
    3436    procedure PaintBox1Paint(Sender: TObject);
    3537    procedure Timer1Timer(Sender: TObject);
     38    procedure Timer2Timer(Sender: TObject);
    3639  private
     40    LastTicks: Integer;
    3741    procedure InitProgram;
    3842    procedure UpdateInterface;
     
    143147end;
    144148
     149procedure TFormMain.Timer2Timer(Sender: TObject);
     150begin
     151  Label2.Caption := 'Ticks/s: ' + IntToStr(Machine.Cpu.ExecutedCount - LastTicks);
     152  LastTicks := Machine.Cpu.ExecutedCount;
     153end;
     154
    145155procedure TFormMain.InitProgram;
    146156begin
Note: See TracChangeset for help on using the changeset viewer.