Changeset 238 for branches/CpuSingleSize/Forms
- Timestamp:
- Jul 15, 2023, 12:51:15 AM (16 months ago)
- Location:
- branches/CpuSingleSize/Forms
- Files:
-
- 20 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/CpuSingleSize/Forms/FormAssembler.lfm
r237 r238 8 8 ClientWidth = 1106 9 9 DesignTimePPI = 144 10 OnShow = FormShow 11 LCLVersion = '2.2.2.0' 10 LCLVersion = '2.2.6.0' 12 11 inline SynEdit1: TSynEdit 13 12 Left = 16 -
branches/CpuSingleSize/Forms/FormAssembler.pas
r237 r238 1 unit UFormAssembler;1 unit FormAssembler; 2 2 3 3 interface … … 14 14 SynAnySyn1: TSynAnySyn; 15 15 SynEdit1: TSynEdit; 16 procedure FormShow(Sender: TObject);17 private18 19 16 public 17 procedure Select(Position: TPoint); 20 18 end; 21 19 22 var23 FormAssembler: TFormAssembler;24 20 25 21 implementation … … 29 25 { TFormAssembler } 30 26 31 procedure TFormAssembler. FormShow(Sender: TObject);27 procedure TFormAssembler.Select(Position: TPoint); 32 28 begin 29 SynEdit1.CaretXY := Position; 30 SynEdit1.SetFocus; 31 Show; 33 32 end; 34 33 -
branches/CpuSingleSize/Forms/FormConsole.pas
r237 r238 1 unit UFormConsole;1 unit FormConsole; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls, 7 UMachine, UCpu;7 Machine, Cpu; 8 8 9 9 type … … 25 25 end; 26 26 27 var28 FormConsole: TFormConsole;29 27 30 28 implementation -
branches/CpuSingleSize/Forms/FormCpu.pas
r237 r238 1 unit UFormCpu;1 unit FormCpu; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls, 7 ExtCtrls, UCpu;7 ExtCtrls, Cpu; 8 8 9 9 type … … 23 23 procedure ListViewMemoryData(Sender: TObject; Item: TListItem); 24 24 procedure ListViewRegsData(Sender: TObject; Item: TListItem); 25 private26 27 25 public 28 26 Cpu: TCpu; 29 27 end; 30 31 var32 FormCpu: TFormCpu;33 28 34 29 const -
branches/CpuSingleSize/Forms/FormDevices.lfm
r237 r238 9 9 DesignTimePPI = 144 10 10 OnShow = FormShow 11 LCLVersion = '2.2. 2.0'11 LCLVersion = '2.2.6.0' 12 12 object TreeView1: TTreeView 13 13 Left = 16 -
branches/CpuSingleSize/Forms/FormDevices.pas
r237 r238 1 unit UFormDevices;1 unit FormDevices; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls, 7 UMachine;7 Machine; 8 8 9 9 type … … 22 22 end; 23 23 24 var25 FormDevices: TFormDevices;26 24 27 25 implementation … … 30 28 31 29 uses 32 UFormConsole, UFormScreen, UFormStorage;30 FormConsole, FormScreen, FormStorage; 33 31 34 32 const -
branches/CpuSingleSize/Forms/FormDisassembler.pas
r237 r238 1 unit UFormDisassembler;1 unit FormDisassembler; 2 2 3 3 interface … … 21 21 FormDisassembler: TFormDisassembler; 22 22 23 23 24 implementation 24 25 -
branches/CpuSingleSize/Forms/FormHelp.pas
r237 r238 1 unit UFormHelp;1 unit FormHelp; 2 2 3 3 interface … … 20 20 end; 21 21 22 var23 FormHelp: TFormHelp;24 25 22 26 23 implementation … … 29 26 30 27 uses 31 UInstructions;28 Instructions; 32 29 33 30 { TFormHelp } -
branches/CpuSingleSize/Forms/FormMain.lfm
r237 r238 9 9 DesignTimePPI = 144 10 10 Menu = MainMenu1 11 OnClose = FormClose 11 12 OnCreate = FormCreate 12 13 OnDestroy = FormDestroy 13 14 OnShow = FormShow 14 LCLVersion = '2.2. 2.0'15 LCLVersion = '2.2.6.0' 15 16 object ButtonLoad: TButton 16 17 Left = 24 … … 19 20 Width = 113 20 21 Caption = 'Load' 21 OnClick = ButtonLoadClick22 22 TabOrder = 0 23 23 end … … 28 28 Width = 113 29 29 Caption = 'Start' 30 OnClick = ButtonStartClick31 30 TabOrder = 1 32 31 end … … 37 36 Width = 113 38 37 Caption = 'Stop' 39 OnClick = ButtonStopClick40 38 TabOrder = 2 41 39 end -
branches/CpuSingleSize/Forms/FormMain.pas
r237 r238 1 unit UFormMain;1 unit FormMain; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls, 7 ExtCtrls, Menus, UCpu, UMachine, UAssembler;7 ExtCtrls, Menus, Cpu, Machine, Assembler, FormMessages, FormAssembler; 8 8 9 9 type … … 36 36 PanelBottom: TPanel; 37 37 Splitter1: TSplitter; 38 procedure ButtonConsoleClick(Sender: TObject); 39 procedure ButtonCpuClick(Sender: TObject); 40 procedure ButtonLoadClick(Sender: TObject); 41 procedure ButtonScreenClick(Sender: TObject); 42 procedure ButtonStartClick(Sender: TObject); 43 procedure ButtonStopClick(Sender: TObject); 38 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 44 39 procedure FormCreate(Sender: TObject); 45 40 procedure FormDestroy(Sender: TObject); … … 47 42 private 48 43 public 44 FormMessages: TFormMessages; 45 FormAssembler: TFormAssembler; 49 46 procedure DockForm(Form: TForm; DockSite: TWinControl); 50 47 procedure DockInit; 51 48 end; 52 53 var54 FormMain: TFormMain;55 49 56 50 … … 59 53 {$R *.lfm} 60 54 61 uses62 UFormScreen, UFormCpu, UFormConsole, UFormAssembler, UFormMessages;63 64 55 { TFormMain } 65 56 66 57 procedure TFormMain.FormCreate(Sender: TObject); 67 58 begin 59 FormMessages := TFormMessages.Create(nil); 60 FormAssembler := TFormAssembler.Create(nil); 61 FormMessages.OnSelect := FormAssembler.Select; 68 62 end; 69 63 70 procedure TFormMain. ButtonConsoleClick(Sender: TObject);64 procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction); 71 65 begin 72 end; 73 74 procedure TFormMain.ButtonCpuClick(Sender: TObject); 75 begin 76 77 end; 78 79 procedure TFormMain.ButtonLoadClick(Sender: TObject); 80 begin 81 82 end; 83 84 procedure TFormMain.ButtonScreenClick(Sender: TObject); 85 begin 86 87 end; 88 89 procedure TFormMain.ButtonStartClick(Sender: TObject); 90 begin 91 end; 92 93 procedure TFormMain.ButtonStopClick(Sender: TObject); 94 begin 66 Application.Terminate; 95 67 end; 96 68 97 69 procedure TFormMain.FormDestroy(Sender: TObject); 98 70 begin 71 FreeAndNil(FormAssembler); 72 FreeAndNil(FormMessages); 99 73 end; 100 74 -
branches/CpuSingleSize/Forms/FormMessages.lfm
r237 r238 8 8 ClientWidth = 1113 9 9 DesignTimePPI = 144 10 LCLVersion = '2.2. 2.0'10 LCLVersion = '2.2.6.0' 11 11 object ListView1: TListView 12 12 Left = 0 -
branches/CpuSingleSize/Forms/FormMessages.pas
r237 r238 1 unit UFormMessages;1 unit FormMessages; 2 2 3 3 interface … … 7 7 8 8 type 9 TSelectEvent = procedure (Position: TPoint) of object; 9 10 10 11 { TFormMessages } … … 15 16 procedure ListView1DblClick(Sender: TObject); 16 17 private 18 FOnSelect: TSelectEvent; 17 19 public 18 20 procedure Reload; 21 property OnSelect: TSelectEvent read FOnSelect write FOnSelect; 19 22 end; 20 21 var22 FormMessages: TFormMessages;23 23 24 24 … … 28 28 29 29 uses 30 UCore, UMessages, UFormAssembler;30 Core, Message, FormAssembler; 31 31 32 32 { TFormMessages } … … 34 34 procedure TFormMessages.ListView1Data(Sender: TObject; Item: TListItem); 35 35 begin 36 with Core. Assembler do37 if (Item.Index >= 0) and (Item.Index < Message s.Count) then38 with TMessage(Message s[Item.Index]) do begin36 with Core.Core.Assembler do 37 if (Item.Index >= 0) and (Item.Index < Message.Count) then 38 with TMessage(Message[Item.Index]) do begin 39 39 Item.Caption := IntToStr(Position.X) + ', ' + IntToStr(Position.Y); 40 Item.Data := Message s[Item.Index];40 Item.Data := Message[Item.Index]; 41 41 Item.SubItems.Add(Text); 42 42 end; … … 46 46 begin 47 47 if Assigned(ListView1.Selected) then begin 48 FormAssembler.SynEdit1.CaretXY := TMessage(ListView1.Selected.Data).Position; 49 FormAssembler.SynEdit1.SetFocus; 50 FormAssembler.Show; 48 if Assigned(FOnSelect) then 49 FOnSelect(TMessage(ListView1.Selected.Data).Position); 51 50 end; 52 51 end; … … 54 53 procedure TFormMessages.Reload; 55 54 begin 56 ListView1.Items.Count := Core. Assembler.Messages.Count;55 ListView1.Items.Count := Core.Core.Assembler.Message.Count; 57 56 ListView1.Refresh; 58 57 end; 59 58 60 61 59 end. 62 60 -
branches/CpuSingleSize/Forms/FormScreen.lfm
r237 r238 10 10 OnCreate = FormCreate 11 11 OnDestroy = FormDestroy 12 LCLVersion = '2.2. 2.0'12 LCLVersion = '2.2.6.0' 13 13 object PaintBox1: TPaintBox 14 14 Left = 8 -
branches/CpuSingleSize/Forms/FormScreen.pas
r237 r238 1 unit UFormScreen;1 unit FormScreen; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, UMachine;6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, Machine; 7 7 8 8 type … … 26 26 end; 27 27 28 var29 FormScreen: TFormScreen;30 28 31 29 implementation … … 79 77 procedure TFormScreen.FormDestroy(Sender: TObject); 80 78 begin 81 TempBitmap.Free;79 FreeAndNil(TempBitmap); 82 80 end; 83 81 -
branches/CpuSingleSize/Forms/FormStorage.lfm
r237 r238 8 8 ClientWidth = 1153 9 9 DesignTimePPI = 144 10 LCLVersion = '2.2. 2.0'10 LCLVersion = '2.2.6.0' 11 11 object ListView1: TListView 12 12 Left = 17 -
branches/CpuSingleSize/Forms/FormStorage.pas
r237 r238 1 unit UFormStorage;1 unit FormStorage; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, UMachine;6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, Machine; 7 7 8 8 type … … 19 19 end; 20 20 21 var22 FormStorage: TFormStorage;23 21 24 22 implementation
Note:
See TracChangeset
for help on using the changeset viewer.