source: trunk/Forms/FormCPU.pas

Last change on this file was 152, checked in by chronos, 13 months ago
  • Fixed: A typo in interpreter target name.
File size: 1.0 KB
Line 
1unit FormCPU;
2
3interface
4
5uses
6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
7 ExtCtrls, FormEx;
8
9type
10
11 { TFormCPU }
12
13 TFormCPU = class(TFormEx)
14 Label3: TLabel;
15 Label4: TLabel;
16 Label5: TLabel;
17 Label7: TLabel;
18 LabelMemoryPointer: TLabel;
19 LabelProgramPointer: TLabel;
20 LabelStepCounter: TLabel;
21 LabelStepSpeed: TLabel;
22 public
23 LastStepCounter: Integer;
24 procedure Reload;
25 end;
26
27var
28 FormCPU: TFormCPU;
29
30
31implementation
32
33uses
34 Core, TargetInterpreter;
35
36{$R *.lfm}
37
38resourcestring
39 SStepsPerSecond = ' steps/s';
40
41{ TFormCPU }
42
43procedure TFormCPU.Reload;
44begin
45 if Core.Core.CurrentTarget is TTargetInterpreter then
46 with TTargetInterpreter(Core.Core.CurrentTarget) do begin
47 LabelProgramPointer.Caption := IntToStr(ProgramIndex);
48 LabelMemoryPointer.Caption := IntToStr(MemoryPosition);
49 LabelStepCounter.Caption := IntToStr(StepCount);
50 LabelStepSpeed.Caption := IntToStr(StepCount - LastStepCounter) + SStepsPerSecond;
51 LastStepCounter := StepCount;
52 end;
53end;
54
55end.
56
Note: See TracBrowser for help on using the repository browser.