Changeset 30 for branches/UltimatOS/Forms/UFormMain.pas
- Timestamp:
- Jul 5, 2022, 8:28:18 PM (23 months ago)
- Location:
- branches/UltimatOS
- Files:
-
- 1 added
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/UltimatOS
-
Property svn:ignore
set to
UltimatOS
UltimatOS.lps
UltimatOS.res
lib
-
Property svn:ignore
set to
-
branches/UltimatOS/Forms/UFormMain.pas
r29 r30 12 12 13 13 TFormMain = class(TForm) 14 ButtonMemory: TButton; 14 15 ButtonRun: TButton; 16 Label1: TLabel; 15 17 MemoCode: TMemo; 16 18 PaintBox1: TPaintBox; 17 19 Timer1: TTimer; 20 procedure ButtonMemoryClick(Sender: TObject); 18 21 procedure ButtonRunClick(Sender: TObject); 19 22 procedure FormCreate(Sender: TObject); … … 37 40 38 41 uses 39 UInstructionWriter ;42 UInstructionWriter, UFormMemory; 40 43 41 44 { TFormMain } … … 49 52 procedure TFormMain.ButtonRunClick(Sender: TObject); 50 53 begin 54 Machine.Reset; 51 55 with TInstructionWriter.Create do 52 56 try … … 56 60 Free; 57 61 end; 58 Machine.Reset;59 62 Machine.Cpu.Run; 63 Label1.Caption := 'Executed instructions: ' + IntToStr(Machine.Cpu.ExecutedCount); 64 end; 65 66 procedure TFormMain.ButtonMemoryClick(Sender: TObject); 67 begin 68 FormMemory.Memory := Machine.Memory; 69 FormMemory.Show; 60 70 end; 61 71
Note:
See TracChangeset
for help on using the changeset viewer.