Last change
on this file was 145, checked in by chronos, 11 months ago |
- Modified: Remove U prefix from unit names.
- Modified: Updated Common package.
|
File size:
1.2 KB
|
Line | |
---|
1 | unit FormCPU;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
---|
7 | ExtCtrls;
|
---|
8 |
|
---|
9 | type
|
---|
10 |
|
---|
11 | { TFormCPU }
|
---|
12 |
|
---|
13 | TFormCPU = class(TForm)
|
---|
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 | procedure FormCreate(Sender: TObject);
|
---|
23 | public
|
---|
24 | LastStepCounter: Integer;
|
---|
25 | procedure Reload;
|
---|
26 | end;
|
---|
27 |
|
---|
28 | var
|
---|
29 | FormCPU: TFormCPU;
|
---|
30 |
|
---|
31 |
|
---|
32 | implementation
|
---|
33 |
|
---|
34 | uses
|
---|
35 | Core, TargetInterpretter;
|
---|
36 |
|
---|
37 | {$R *.lfm}
|
---|
38 |
|
---|
39 | resourcestring
|
---|
40 | SStepsPerSecond = ' steps/s';
|
---|
41 |
|
---|
42 | { TFormCPU }
|
---|
43 |
|
---|
44 | procedure TFormCPU.FormCreate(Sender: TObject);
|
---|
45 | begin
|
---|
46 | Core.Core.Translator.TranslateComponentRecursive(Self);
|
---|
47 | Core.Core.ThemeManager.UseTheme(Self);
|
---|
48 | end;
|
---|
49 |
|
---|
50 | procedure TFormCPU.Reload;
|
---|
51 | begin
|
---|
52 | if Core.Core.CurrentTarget is TTargetInterpretter then
|
---|
53 | with TTargetInterpretter(Core.Core.CurrentTarget) do begin
|
---|
54 | LabelProgramPointer.Caption := IntToStr(ProgramIndex);
|
---|
55 | LabelMemoryPointer.Caption := IntToStr(MemoryPosition);
|
---|
56 | LabelStepCounter.Caption := IntToStr(StepCount);
|
---|
57 | LabelStepSpeed.Caption := IntToStr(StepCount - LastStepCounter) + SStepsPerSecond;
|
---|
58 | LastStepCounter := StepCount;
|
---|
59 | end;
|
---|
60 | end;
|
---|
61 |
|
---|
62 | end.
|
---|
63 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.