|
Last change
on this file was 5, checked in by chronos, 13 years ago |
- Added: LibreDevelopCommon package which supply API unit ULDStudioAPI.
- Modified: Module LDStudioCommon now register forms, actions and menu items using API.
|
|
File size:
1.1 KB
|
| 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 | {$R *.lfm}
|
|---|
| 36 |
|
|---|
| 37 | resourcestring
|
|---|
| 38 | SStepsPerSecond = ' steps/s';
|
|---|
| 39 |
|
|---|
| 40 | { TFormCPU }
|
|---|
| 41 |
|
|---|
| 42 | procedure TFormCPU.Reload;
|
|---|
| 43 | begin
|
|---|
| 44 | { if MainForm.CurrentTarget is TTargetInterpretter then
|
|---|
| 45 | with TTargetInterpretter(MainForm.CurrentTarget) do begin
|
|---|
| 46 | LabelProgramPointer.Caption := IntToStr(ProgramIndex);
|
|---|
| 47 | LabelMemoryPointer.Caption := IntToStr(MemoryPosition);
|
|---|
| 48 | LabelStepCounter.Caption := IntToStr(StepCount);
|
|---|
| 49 | LabelStepSpeed.Caption := IntToStr(StepCount - LastStepCounter) + SStepsPerSecond;
|
|---|
| 50 | LastStepCounter := StepCount;
|
|---|
| 51 | end;}
|
|---|
| 52 | end;
|
|---|
| 53 |
|
|---|
| 54 | end.
|
|---|
| 55 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.