Line | |
---|
1 | unit UFormCPU;
|
---|
2 |
|
---|
3 | {$mode objfpc}{$H+}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
---|
9 | ExtCtrls;
|
---|
10 |
|
---|
11 | type
|
---|
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 |
|
---|
30 | var
|
---|
31 | FormCPU: TFormCPU;
|
---|
32 |
|
---|
33 | implementation
|
---|
34 |
|
---|
35 | uses
|
---|
36 | UCore, UTargetInterpretter;
|
---|
37 |
|
---|
38 | {$R *.lfm}
|
---|
39 |
|
---|
40 | resourcestring
|
---|
41 | SStepsPerSecond = ' steps/s';
|
---|
42 |
|
---|
43 | { TFormCPU }
|
---|
44 |
|
---|
45 | procedure TFormCPU.Reload;
|
---|
46 | begin
|
---|
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;
|
---|
55 | end;
|
---|
56 |
|
---|
57 | end.
|
---|
58 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.