source: tags/1.0.0/Forms/UFormCPU.pas

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