| Line | |
|---|
| 1 | unit FormCPU;
|
|---|
| 2 |
|
|---|
| 3 | interface
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
|---|
| 7 | ExtCtrls, FormEx;
|
|---|
| 8 |
|
|---|
| 9 | type
|
|---|
| 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 |
|
|---|
| 27 | var
|
|---|
| 28 | FormCPU: TFormCPU;
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 | implementation
|
|---|
| 32 |
|
|---|
| 33 | uses
|
|---|
| 34 | Core, TargetInterpreter;
|
|---|
| 35 |
|
|---|
| 36 | {$R *.lfm}
|
|---|
| 37 |
|
|---|
| 38 | resourcestring
|
|---|
| 39 | SStepsPerSecond = ' steps/s';
|
|---|
| 40 |
|
|---|
| 41 | { TFormCPU }
|
|---|
| 42 |
|
|---|
| 43 | procedure TFormCPU.Reload;
|
|---|
| 44 | begin
|
|---|
| 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;
|
|---|
| 53 | end;
|
|---|
| 54 |
|
|---|
| 55 | end.
|
|---|
| 56 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.