Changeset 30 for branches/UltimatOS/Forms
- Timestamp:
- Jul 5, 2022, 8:28:18 PM (2 years ago)
- Location:
- branches/UltimatOS
- Files:
-
- 3 added
- 1 edited
- 2 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.lfm
r29 r30 36 36 TabOrder = 1 37 37 end 38 object Label1: TLabel 39 Left = 662 40 Height = 22 41 Top = 500 42 Width = 68 43 Caption = 'Instrukcí:' 44 end 45 object ButtonMemory: TButton 46 Left = 128 47 Height = 33 48 Top = 496 49 Width = 98 50 Caption = 'Memory' 51 OnClick = ButtonMemoryClick 52 TabOrder = 2 53 end 38 54 object Timer1: TTimer 39 55 Interval = 20 -
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.