Changeset 238
- Timestamp:
- Jul 15, 2023, 12:51:15 AM (16 months ago)
- Location:
- branches/CpuSingleSize
- Files:
-
- 2 edited
- 31 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/CpuSingleSize/Assembler.pas
r237 r238 1 unit UAssembler;1 unit Assembler; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, UInstructions, UCpu, Generics.Collections,7 UMemory, UMessages, UParser;6 Classes, SysUtils, Instructions, Cpu, Generics.Collections, 7 Memory, Message, Parser; 8 8 9 9 type … … 36 36 LabelRefs: TList<TLabelRef>; 37 37 Variables: TDictionary<string, Integer>; 38 Message s: TMessages;38 Message: TMessages; 39 39 procedure Error(Text: string; Pos: TPoint); 40 40 procedure Compile(Source: string); … … 95 95 procedure TAssembler.Error(Text: string; Pos: TPoint); 96 96 begin 97 Message s.AddMessage(Text, Pos);97 Message.AddMessage(Text, Pos); 98 98 if Assigned(FOnError) then 99 99 FOnError(Text, Pos); … … 102 102 procedure TAssembler.Compile(Source: string); 103 103 begin 104 Message s.Clear;104 Message.Clear; 105 105 Memory.Size := 0; 106 106 Labels.Clear; … … 319 319 Parser := TParser.Create; 320 320 Parser.OnError := Error; 321 Message s:= TMessages.Create;321 Message := TMessages.Create; 322 322 Memory := TMemory.Create; 323 323 InstructionSet := TInstructionSet.Create; … … 334 334 FreeAndNil(InstructionSet); 335 335 FreeAndNil(Memory); 336 FreeAndNil(Message s);336 FreeAndNil(Message); 337 337 FreeAndNil(Parser); 338 338 inherited; -
branches/CpuSingleSize/Core.pas
r237 r238 1 unit UCore;1 unit Core; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, ActnList, Controls, Forms, UMachine, UMemory, UMessages, 7 UDisassembler, UAssembler; 6 Classes, SysUtils, ActnList, Controls, Forms, Machine, Memory, Message, 7 Disassembler, Assembler, FormCpu, FormDevices, FormHelp, FormMessages, 8 FormMain, FormDisassembler; 8 9 9 10 type … … 38 39 procedure DataModuleDestroy(Sender: TObject); 39 40 private 40 41 FormCpu: TFormCpu; 42 FormDevices: TFormDevices; 43 FormHelp: TFormHelp; 44 FormMain: TFormMain; 45 FormDisassembler: TFormDisassembler; 41 46 public 42 47 Assembler: TAssembler; … … 55 60 56 61 uses 57 UFormScreen, UFormCpu, UFormAssembler, UFormConsole, UFormHelp, 58 UFormDisassembler, UFormMessages, UFormDevices; 62 FormScreen, FormAssembler, FormConsole; 59 63 60 64 { TCore } … … 67 71 procedure TCore.AHelpExecute(Sender: TObject); 68 72 begin 73 if not Assigned(FormHelp) then 74 FormHelp := TFormHelp.Create(nil); 69 75 FormHelp.Show; 70 76 end; … … 87 93 Assembler := TAssembler.Create; 88 94 Disassembler := TDisassembler.Create; 95 FormMain := TFormMain.Create(nil); 96 FormMain.Show; 89 97 end; 90 98 91 99 procedure TCore.DataModuleDestroy(Sender: TObject); 92 100 begin 101 if Assigned(FormCpu) then FreeAndNil(FormCpu); 102 if Assigned(FormDevices) then FreeAndNil(FormDevices); 103 if Assigned(FormHelp) then FreeAndNil(FormHelp); 104 if Assigned(FormDisassembler) then FreeAndNil(FormDisassembler); 105 FreeAndNil(FormMain); 93 106 FreeAndNil(Disassembler); 94 107 FreeAndNil(Assembler); … … 101 114 AStop.Execute; 102 115 with Assembler do begin 103 Compile(Form Assembler.SynEdit1.Lines.Text);116 Compile(FormMain.FormAssembler.SynEdit1.Lines.Text); 104 117 //Memory.SaveToFile('compiled.bin'); 105 118 CompiledProgram.Assign(Memory); … … 107 120 Machine.Memory.WriteMemory(CompiledProgram); 108 121 end; 109 if FormMessages.Visible then FormMessages.Reload; 122 if FormMain.FormMessages.Visible then 123 FormMain.FormMessages.Reload; 110 124 end; 111 125 112 126 procedure TCore.ACpuExecute(Sender: TObject); 113 127 begin 128 if not Assigned(FormCpu) then 129 FormCpu := TFormCpu.Create(nil); 114 130 FormCpu.Cpu := Machine.Cpu; 115 131 FormCpu.Show; … … 118 134 procedure TCore.ADevicesExecute(Sender: TObject); 119 135 begin 136 if not Assigned(FormDevices) then 137 FormDevices := TFormDevices.Create(nil); 120 138 FormDevices.Devices := Machine.Devices; 121 139 FormDevices.Show; … … 124 142 procedure TCore.ADisassemblerExecute(Sender: TObject); 125 143 begin 144 if not Assigned(FormDisassembler) then 145 FormDisassembler := TFormDisassembler.Create(nil); 126 146 with Disassembler do begin 127 147 Memory := CompiledProgram; -
branches/CpuSingleSize/Cpu.pas
r237 r238 1 unit UCpu;1 unit Cpu; 2 2 3 3 interface -
branches/CpuSingleSize/CpuSingleSize.lpi
r223 r238 82 82 </Unit0> 83 83 <Unit1> 84 <Filename Value="Forms/ UFormMain.pas"/>84 <Filename Value="Forms/FormMain.pas"/> 85 85 <IsPartOfProject Value="True"/> 86 86 <ComponentName Value="FormMain"/> … … 89 89 </Unit1> 90 90 <Unit2> 91 <Filename Value=" UCpu.pas"/>91 <Filename Value="Cpu.pas"/> 92 92 <IsPartOfProject Value="True"/> 93 93 </Unit2> 94 94 <Unit3> 95 <Filename Value=" UMachine.pas"/>95 <Filename Value="Machine.pas"/> 96 96 <IsPartOfProject Value="True"/> 97 97 </Unit3> 98 98 <Unit4> 99 <Filename Value=" UAssembler.pas"/>99 <Filename Value="Assembler.pas"/> 100 100 <IsPartOfProject Value="True"/> 101 101 </Unit4> 102 102 <Unit5> 103 <Filename Value=" UInstructions.pas"/>103 <Filename Value="Instructions.pas"/> 104 104 <IsPartOfProject Value="True"/> 105 105 </Unit5> 106 106 <Unit6> 107 <Filename Value="Forms/ UFormScreen.pas"/>107 <Filename Value="Forms/FormScreen.pas"/> 108 108 <IsPartOfProject Value="True"/> 109 109 <ComponentName Value="FormScreen"/> … … 112 112 </Unit6> 113 113 <Unit7> 114 <Filename Value="Forms/ UFormConsole.pas"/>114 <Filename Value="Forms/FormConsole.pas"/> 115 115 <IsPartOfProject Value="True"/> 116 116 <ComponentName Value="FormConsole"/> … … 119 119 </Unit7> 120 120 <Unit8> 121 <Filename Value="Forms/ UFormCpu.pas"/>121 <Filename Value="Forms/FormCpu.pas"/> 122 122 <IsPartOfProject Value="True"/> 123 123 <ComponentName Value="FormCpu"/> … … 126 126 </Unit8> 127 127 <Unit9> 128 <Filename Value="Forms/ UFormAssembler.pas"/>128 <Filename Value="Forms/FormAssembler.pas"/> 129 129 <IsPartOfProject Value="True"/> 130 130 <ComponentName Value="FormAssembler"/> … … 133 133 </Unit9> 134 134 <Unit10> 135 <Filename Value=" UCore.pas"/>135 <Filename Value="Core.pas"/> 136 136 <IsPartOfProject Value="True"/> 137 137 <ComponentName Value="Core"/> … … 140 140 </Unit10> 141 141 <Unit11> 142 <Filename Value="Forms/ UFormDisassembler.pas"/>142 <Filename Value="Forms/FormDisassembler.pas"/> 143 143 <IsPartOfProject Value="True"/> 144 144 <ComponentName Value="FormDisassembler"/> … … 147 147 </Unit11> 148 148 <Unit12> 149 <Filename Value=" UDisassembler.pas"/>149 <Filename Value="Disassembler.pas"/> 150 150 <IsPartOfProject Value="True"/> 151 151 </Unit12> 152 152 <Unit13> 153 <Filename Value=" UMemory.pas"/>153 <Filename Value="Memory.pas"/> 154 154 <IsPartOfProject Value="True"/> 155 155 </Unit13> 156 156 <Unit14> 157 <Filename Value="Forms/ UFormMessages.pas"/>157 <Filename Value="Forms/FormMessages.pas"/> 158 158 <IsPartOfProject Value="True"/> 159 159 <ComponentName Value="FormMessages"/> … … 162 162 </Unit14> 163 163 <Unit15> 164 <Filename Value=" UMessages.pas"/>164 <Filename Value="Message.pas"/> 165 165 <IsPartOfProject Value="True"/> 166 166 </Unit15> 167 167 <Unit16> 168 <Filename Value="Forms/ UFormHelp.pas"/>168 <Filename Value="Forms/FormHelp.pas"/> 169 169 <IsPartOfProject Value="True"/> 170 170 <ComponentName Value="FormHelp"/> … … 173 173 </Unit16> 174 174 <Unit17> 175 <Filename Value=" UParser.pas"/>175 <Filename Value="Parser.pas"/> 176 176 <IsPartOfProject Value="True"/> 177 177 </Unit17> 178 178 <Unit18> 179 <Filename Value="Forms/ UFormDevices.pas"/>179 <Filename Value="Forms/FormDevices.pas"/> 180 180 <IsPartOfProject Value="True"/> 181 181 <ComponentName Value="FormDevices"/> … … 184 184 </Unit18> 185 185 <Unit19> 186 <Filename Value="Forms/ UFormStorage.pas"/>186 <Filename Value="Forms/FormStorage.pas"/> 187 187 <IsPartOfProject Value="True"/> 188 188 <ComponentName Value="FormStorage"/> … … 191 191 </Unit19> 192 192 <Unit20> 193 <Filename Value=" Forms/UProject.pas"/>193 <Filename Value="Project.pas"/> 194 194 <IsPartOfProject Value="True"/> 195 195 </Unit20> … … 226 226 <Linking> 227 227 <Debugging> 228 <DebugInfoType Value="dsDwarf2Set"/> 228 229 <UseHeaptrc Value="True"/> 229 230 <UseExternalDbgSyms Value="True"/> -
branches/CpuSingleSize/CpuSingleSize.lpr
r223 r238 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UFormMain, UCpu, UAssembler, UInstructions, UFormScreen, UMachine,11 UFormCpu, UFormConsole, UFormAssembler, UCore, UFormDisassembler,12 UDisassembler, UMemory, UFormMessages, UMessages, SysUtils, UFormHelp,13 UParser, UFormDevices, UFormStorage, UProject;10 Forms, FormMain, Cpu, Assembler, Instructions, FormScreen, Machine, 11 FormCpu, FormConsole, FormAssembler, Core, FormDisassembler, 12 Disassembler, Memory, FormMessages, Message, SysUtils, FormHelp, 13 Parser, FormDevices, FormStorage, Project; 14 14 15 15 {$R *.res} … … 29 29 Application.Scaled := True; 30 30 Application.Initialize; 31 Application.CreateForm(TCore, Core); 32 Application.CreateForm(TFormMain, FormMain); 33 Application.CreateForm(TFormCpu, FormCpu); 34 Application.CreateForm(TFormAssembler, FormAssembler); 35 Application.CreateForm(TFormDisassembler, FormDisassembler); 36 Application.CreateForm(TFormMessages, FormMessages); 37 Application.CreateForm(TFormHelp, FormHelp); 38 Application.CreateForm(TFormDevices, FormDevices); 31 Application.CreateForm(TCore, Core.Core); 39 32 Application.Run; 40 33 end. -
branches/CpuSingleSize/Disassembler.pas
r237 r238 1 unit UDisassembler;1 unit Disassembler; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, UCpu, UInstructions, StrUtils, UMemory;6 Classes, SysUtils, Cpu, Instructions, StrUtils, Memory; 7 7 8 8 type -
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 -
branches/CpuSingleSize/Instructions.pas
r237 r238 1 unit UInstructions;1 unit Instructions; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, Generics.Collections, UCpu;6 Classes, SysUtils, Generics.Collections, Cpu; 7 7 8 8 type -
branches/CpuSingleSize/Machine.pas
r237 r238 1 unit UMachine;1 unit Machine; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, UCpu, Syncobjs, UMemory, Generics.Collections, Forms;6 Classes, SysUtils, Cpu, Syncobjs, Memory, Generics.Collections, Forms; 7 7 8 8 type … … 34 34 InterruptVector: Integer; 35 35 Form: TFormDevice; 36 destructor Destroy; override; 36 37 procedure PulseInterrupt; 37 38 procedure OutputHandler(Port, Data: TInteger); virtual; … … 250 251 { TDevice } 251 252 253 destructor TDevice.Destroy; 254 begin 255 if Assigned(Form) then FreeAndNil(Form); 256 inherited; 257 end; 258 252 259 procedure TDevice.PulseInterrupt; 253 260 begin … … 497 504 begin 498 505 PowerOff; 506 FreeAndNil(Cpu); 507 FreeAndNil(Memory); 499 508 FreeAndNil(Devices); 500 509 inherited; -
branches/CpuSingleSize/Memory.pas
r237 r238 1 unit UMemory;1 unit Memory; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, UCpu;6 Classes, SysUtils, Cpu; 7 7 8 8 type -
branches/CpuSingleSize/Message.pas
r237 r238 1 unit UMessages;1 unit Message; 2 2 3 3 interface -
branches/CpuSingleSize/Parser.pas
r237 r238 1 unit UParser;1 unit Parser; 2 2 3 3 interface -
branches/CpuSingleSize/Project.pas
r237 r238 1 unit UProject;1 unit Project; 2 2 3 3 interface
Note:
See TracChangeset
for help on using the changeset viewer.