Changeset 238 for branches/CpuSingleSize


Ignore:
Timestamp:
Jul 15, 2023, 12:51:15 AM (16 months ago)
Author:
chronos
Message:
  • Modified: Removed U prefix from unit names.
  • Fixed: Memory leaks.
Location:
branches/CpuSingleSize
Files:
2 edited
31 moved

Legend:

Unmodified
Added
Removed
  • branches/CpuSingleSize/Assembler.pas

    r237 r238  
    1 unit UAssembler;
     1unit Assembler;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, UInstructions, UCpu, Generics.Collections,
    7   UMemory, UMessages, UParser;
     6  Classes, SysUtils, Instructions, Cpu, Generics.Collections,
     7  Memory, Message, Parser;
    88
    99type
     
    3636    LabelRefs: TList<TLabelRef>;
    3737    Variables: TDictionary<string, Integer>;
    38     Messages: TMessages;
     38    Message: TMessages;
    3939    procedure Error(Text: string; Pos: TPoint);
    4040    procedure Compile(Source: string);
     
    9595procedure TAssembler.Error(Text: string; Pos: TPoint);
    9696begin
    97   Messages.AddMessage(Text, Pos);
     97  Message.AddMessage(Text, Pos);
    9898  if Assigned(FOnError) then
    9999    FOnError(Text, Pos);
     
    102102procedure TAssembler.Compile(Source: string);
    103103begin
    104   Messages.Clear;
     104  Message.Clear;
    105105  Memory.Size := 0;
    106106  Labels.Clear;
     
    319319  Parser := TParser.Create;
    320320  Parser.OnError := Error;
    321   Messages := TMessages.Create;
     321  Message := TMessages.Create;
    322322  Memory := TMemory.Create;
    323323  InstructionSet := TInstructionSet.Create;
     
    334334  FreeAndNil(InstructionSet);
    335335  FreeAndNil(Memory);
    336   FreeAndNil(Messages);
     336  FreeAndNil(Message);
    337337  FreeAndNil(Parser);
    338338  inherited;
  • branches/CpuSingleSize/Core.pas

    r237 r238  
    1 unit UCore;
     1unit Core;
    22
    33interface
    44
    55uses
    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;
    89
    910type
     
    3839    procedure DataModuleDestroy(Sender: TObject);
    3940  private
    40 
     41    FormCpu: TFormCpu;
     42    FormDevices: TFormDevices;
     43    FormHelp: TFormHelp;
     44    FormMain: TFormMain;
     45    FormDisassembler: TFormDisassembler;
    4146  public
    4247    Assembler: TAssembler;
     
    5560
    5661uses
    57   UFormScreen, UFormCpu, UFormAssembler, UFormConsole, UFormHelp,
    58   UFormDisassembler, UFormMessages, UFormDevices;
     62  FormScreen, FormAssembler, FormConsole;
    5963
    6064{ TCore }
     
    6771procedure TCore.AHelpExecute(Sender: TObject);
    6872begin
     73  if not Assigned(FormHelp) then
     74    FormHelp := TFormHelp.Create(nil);
    6975  FormHelp.Show;
    7076end;
     
    8793  Assembler := TAssembler.Create;
    8894  Disassembler := TDisassembler.Create;
     95  FormMain := TFormMain.Create(nil);
     96  FormMain.Show;
    8997end;
    9098
    9199procedure TCore.DataModuleDestroy(Sender: TObject);
    92100begin
     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);
    93106  FreeAndNil(Disassembler);
    94107  FreeAndNil(Assembler);
     
    101114  AStop.Execute;
    102115  with Assembler do begin
    103     Compile(FormAssembler.SynEdit1.Lines.Text);
     116    Compile(FormMain.FormAssembler.SynEdit1.Lines.Text);
    104117    //Memory.SaveToFile('compiled.bin');
    105118    CompiledProgram.Assign(Memory);
     
    107120    Machine.Memory.WriteMemory(CompiledProgram);
    108121  end;
    109   if FormMessages.Visible then FormMessages.Reload;
     122  if FormMain.FormMessages.Visible then
     123    FormMain.FormMessages.Reload;
    110124end;
    111125
    112126procedure TCore.ACpuExecute(Sender: TObject);
    113127begin
     128  if not Assigned(FormCpu) then
     129    FormCpu := TFormCpu.Create(nil);
    114130  FormCpu.Cpu := Machine.Cpu;
    115131  FormCpu.Show;
     
    118134procedure TCore.ADevicesExecute(Sender: TObject);
    119135begin
     136  if not Assigned(FormDevices) then
     137    FormDevices := TFormDevices.Create(nil);
    120138  FormDevices.Devices := Machine.Devices;
    121139  FormDevices.Show;
     
    124142procedure TCore.ADisassemblerExecute(Sender: TObject);
    125143begin
     144  if not Assigned(FormDisassembler) then
     145    FormDisassembler := TFormDisassembler.Create(nil);
    126146  with Disassembler do begin
    127147    Memory := CompiledProgram;
  • branches/CpuSingleSize/Cpu.pas

    r237 r238  
    1 unit UCpu;
     1unit Cpu;
    22
    33interface
  • branches/CpuSingleSize/CpuSingleSize.lpi

    r223 r238  
    8282      </Unit0>
    8383      <Unit1>
    84         <Filename Value="Forms/UFormMain.pas"/>
     84        <Filename Value="Forms/FormMain.pas"/>
    8585        <IsPartOfProject Value="True"/>
    8686        <ComponentName Value="FormMain"/>
     
    8989      </Unit1>
    9090      <Unit2>
    91         <Filename Value="UCpu.pas"/>
     91        <Filename Value="Cpu.pas"/>
    9292        <IsPartOfProject Value="True"/>
    9393      </Unit2>
    9494      <Unit3>
    95         <Filename Value="UMachine.pas"/>
     95        <Filename Value="Machine.pas"/>
    9696        <IsPartOfProject Value="True"/>
    9797      </Unit3>
    9898      <Unit4>
    99         <Filename Value="UAssembler.pas"/>
     99        <Filename Value="Assembler.pas"/>
    100100        <IsPartOfProject Value="True"/>
    101101      </Unit4>
    102102      <Unit5>
    103         <Filename Value="UInstructions.pas"/>
     103        <Filename Value="Instructions.pas"/>
    104104        <IsPartOfProject Value="True"/>
    105105      </Unit5>
    106106      <Unit6>
    107         <Filename Value="Forms/UFormScreen.pas"/>
     107        <Filename Value="Forms/FormScreen.pas"/>
    108108        <IsPartOfProject Value="True"/>
    109109        <ComponentName Value="FormScreen"/>
     
    112112      </Unit6>
    113113      <Unit7>
    114         <Filename Value="Forms/UFormConsole.pas"/>
     114        <Filename Value="Forms/FormConsole.pas"/>
    115115        <IsPartOfProject Value="True"/>
    116116        <ComponentName Value="FormConsole"/>
     
    119119      </Unit7>
    120120      <Unit8>
    121         <Filename Value="Forms/UFormCpu.pas"/>
     121        <Filename Value="Forms/FormCpu.pas"/>
    122122        <IsPartOfProject Value="True"/>
    123123        <ComponentName Value="FormCpu"/>
     
    126126      </Unit8>
    127127      <Unit9>
    128         <Filename Value="Forms/UFormAssembler.pas"/>
     128        <Filename Value="Forms/FormAssembler.pas"/>
    129129        <IsPartOfProject Value="True"/>
    130130        <ComponentName Value="FormAssembler"/>
     
    133133      </Unit9>
    134134      <Unit10>
    135         <Filename Value="UCore.pas"/>
     135        <Filename Value="Core.pas"/>
    136136        <IsPartOfProject Value="True"/>
    137137        <ComponentName Value="Core"/>
     
    140140      </Unit10>
    141141      <Unit11>
    142         <Filename Value="Forms/UFormDisassembler.pas"/>
     142        <Filename Value="Forms/FormDisassembler.pas"/>
    143143        <IsPartOfProject Value="True"/>
    144144        <ComponentName Value="FormDisassembler"/>
     
    147147      </Unit11>
    148148      <Unit12>
    149         <Filename Value="UDisassembler.pas"/>
     149        <Filename Value="Disassembler.pas"/>
    150150        <IsPartOfProject Value="True"/>
    151151      </Unit12>
    152152      <Unit13>
    153         <Filename Value="UMemory.pas"/>
     153        <Filename Value="Memory.pas"/>
    154154        <IsPartOfProject Value="True"/>
    155155      </Unit13>
    156156      <Unit14>
    157         <Filename Value="Forms/UFormMessages.pas"/>
     157        <Filename Value="Forms/FormMessages.pas"/>
    158158        <IsPartOfProject Value="True"/>
    159159        <ComponentName Value="FormMessages"/>
     
    162162      </Unit14>
    163163      <Unit15>
    164         <Filename Value="UMessages.pas"/>
     164        <Filename Value="Message.pas"/>
    165165        <IsPartOfProject Value="True"/>
    166166      </Unit15>
    167167      <Unit16>
    168         <Filename Value="Forms/UFormHelp.pas"/>
     168        <Filename Value="Forms/FormHelp.pas"/>
    169169        <IsPartOfProject Value="True"/>
    170170        <ComponentName Value="FormHelp"/>
     
    173173      </Unit16>
    174174      <Unit17>
    175         <Filename Value="UParser.pas"/>
     175        <Filename Value="Parser.pas"/>
    176176        <IsPartOfProject Value="True"/>
    177177      </Unit17>
    178178      <Unit18>
    179         <Filename Value="Forms/UFormDevices.pas"/>
     179        <Filename Value="Forms/FormDevices.pas"/>
    180180        <IsPartOfProject Value="True"/>
    181181        <ComponentName Value="FormDevices"/>
     
    184184      </Unit18>
    185185      <Unit19>
    186         <Filename Value="Forms/UFormStorage.pas"/>
     186        <Filename Value="Forms/FormStorage.pas"/>
    187187        <IsPartOfProject Value="True"/>
    188188        <ComponentName Value="FormStorage"/>
     
    191191      </Unit19>
    192192      <Unit20>
    193         <Filename Value="Forms/UProject.pas"/>
     193        <Filename Value="Project.pas"/>
    194194        <IsPartOfProject Value="True"/>
    195195      </Unit20>
     
    226226    <Linking>
    227227      <Debugging>
     228        <DebugInfoType Value="dsDwarf2Set"/>
    228229        <UseHeaptrc Value="True"/>
    229230        <UseExternalDbgSyms Value="True"/>
  • branches/CpuSingleSize/CpuSingleSize.lpr

    r223 r238  
    88  {$ENDIF}{$ENDIF}
    99  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;
    1414
    1515{$R *.res}
     
    2929  Application.Scaled := True;
    3030  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);
    3932  Application.Run;
    4033end.
  • branches/CpuSingleSize/Disassembler.pas

    r237 r238  
    1 unit UDisassembler;
     1unit Disassembler;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, UCpu, UInstructions, StrUtils, UMemory;
     6  Classes, SysUtils, Cpu, Instructions, StrUtils, Memory;
    77
    88type
  • branches/CpuSingleSize/Forms/FormAssembler.lfm

    r237 r238  
    88  ClientWidth = 1106
    99  DesignTimePPI = 144
    10   OnShow = FormShow
    11   LCLVersion = '2.2.2.0'
     10  LCLVersion = '2.2.6.0'
    1211  inline SynEdit1: TSynEdit
    1312    Left = 16
  • branches/CpuSingleSize/Forms/FormAssembler.pas

    r237 r238  
    1 unit UFormAssembler;
     1unit FormAssembler;
    22
    33interface
     
    1414    SynAnySyn1: TSynAnySyn;
    1515    SynEdit1: TSynEdit;
    16     procedure FormShow(Sender: TObject);
    17   private
    18 
    1916  public
     17    procedure Select(Position: TPoint);
    2018  end;
    2119
    22 var
    23   FormAssembler: TFormAssembler;
    2420
    2521implementation
     
    2925{ TFormAssembler }
    3026
    31 procedure TFormAssembler.FormShow(Sender: TObject);
     27procedure TFormAssembler.Select(Position: TPoint);
    3228begin
     29  SynEdit1.CaretXY := Position;
     30  SynEdit1.SetFocus;
     31  Show;
    3332end;
    3433
  • branches/CpuSingleSize/Forms/FormConsole.pas

    r237 r238  
    1 unit UFormConsole;
     1unit FormConsole;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
    7   UMachine, UCpu;
     7  Machine, Cpu;
    88
    99type
     
    2525  end;
    2626
    27 var
    28   FormConsole: TFormConsole;
    2927
    3028implementation
  • branches/CpuSingleSize/Forms/FormCpu.pas

    r237 r238  
    1 unit UFormCpu;
     1unit FormCpu;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls,
    7   ExtCtrls, UCpu;
     7  ExtCtrls, Cpu;
    88
    99type
     
    2323    procedure ListViewMemoryData(Sender: TObject; Item: TListItem);
    2424    procedure ListViewRegsData(Sender: TObject; Item: TListItem);
    25   private
    26 
    2725  public
    2826    Cpu: TCpu;
    2927  end;
    30 
    31 var
    32   FormCpu: TFormCpu;
    3328
    3429const
  • branches/CpuSingleSize/Forms/FormDevices.lfm

    r237 r238  
    99  DesignTimePPI = 144
    1010  OnShow = FormShow
    11   LCLVersion = '2.2.2.0'
     11  LCLVersion = '2.2.6.0'
    1212  object TreeView1: TTreeView
    1313    Left = 16
  • branches/CpuSingleSize/Forms/FormDevices.pas

    r237 r238  
    1 unit UFormDevices;
     1unit FormDevices;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls,
    7   UMachine;
     7  Machine;
    88
    99type
     
    2222  end;
    2323
    24 var
    25   FormDevices: TFormDevices;
    2624
    2725implementation
     
    3028
    3129uses
    32   UFormConsole, UFormScreen, UFormStorage;
     30  FormConsole, FormScreen, FormStorage;
    3331
    3432const
  • branches/CpuSingleSize/Forms/FormDisassembler.pas

    r237 r238  
    1 unit UFormDisassembler;
     1unit FormDisassembler;
    22
    33interface
     
    2121  FormDisassembler: TFormDisassembler;
    2222
     23
    2324implementation
    2425
  • branches/CpuSingleSize/Forms/FormHelp.pas

    r237 r238  
    1 unit UFormHelp;
     1unit FormHelp;
    22
    33interface
     
    2020  end;
    2121
    22 var
    23   FormHelp: TFormHelp;
    24 
    2522
    2623implementation
     
    2926
    3027uses
    31   UInstructions;
     28  Instructions;
    3229
    3330{ TFormHelp }
  • branches/CpuSingleSize/Forms/FormMain.lfm

    r237 r238  
    99  DesignTimePPI = 144
    1010  Menu = MainMenu1
     11  OnClose = FormClose
    1112  OnCreate = FormCreate
    1213  OnDestroy = FormDestroy
    1314  OnShow = FormShow
    14   LCLVersion = '2.2.2.0'
     15  LCLVersion = '2.2.6.0'
    1516  object ButtonLoad: TButton
    1617    Left = 24
     
    1920    Width = 113
    2021    Caption = 'Load'
    21     OnClick = ButtonLoadClick
    2222    TabOrder = 0
    2323  end
     
    2828    Width = 113
    2929    Caption = 'Start'
    30     OnClick = ButtonStartClick
    3130    TabOrder = 1
    3231  end
     
    3736    Width = 113
    3837    Caption = 'Stop'
    39     OnClick = ButtonStopClick
    4038    TabOrder = 2
    4139  end
  • branches/CpuSingleSize/Forms/FormMain.pas

    r237 r238  
    1 unit UFormMain;
     1unit FormMain;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls,
    7   ExtCtrls, Menus, UCpu, UMachine, UAssembler;
     7  ExtCtrls, Menus, Cpu, Machine, Assembler, FormMessages, FormAssembler;
    88
    99type
     
    3636    PanelBottom: TPanel;
    3737    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);
    4439    procedure FormCreate(Sender: TObject);
    4540    procedure FormDestroy(Sender: TObject);
     
    4742  private
    4843  public
     44    FormMessages: TFormMessages;
     45    FormAssembler: TFormAssembler;
    4946    procedure DockForm(Form: TForm; DockSite: TWinControl);
    5047    procedure DockInit;
    5148  end;
    52 
    53 var
    54   FormMain: TFormMain;
    5549
    5650
     
    5953{$R *.lfm}
    6054
    61 uses
    62   UFormScreen, UFormCpu, UFormConsole, UFormAssembler, UFormMessages;
    63 
    6455{ TFormMain }
    6556
    6657procedure TFormMain.FormCreate(Sender: TObject);
    6758begin
     59  FormMessages := TFormMessages.Create(nil);
     60  FormAssembler := TFormAssembler.Create(nil);
     61  FormMessages.OnSelect := FormAssembler.Select;
    6862end;
    6963
    70 procedure TFormMain.ButtonConsoleClick(Sender: TObject);
     64procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    7165begin
    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;
    9567end;
    9668
    9769procedure TFormMain.FormDestroy(Sender: TObject);
    9870begin
     71  FreeAndNil(FormAssembler);
     72  FreeAndNil(FormMessages);
    9973end;
    10074
  • branches/CpuSingleSize/Forms/FormMessages.lfm

    r237 r238  
    88  ClientWidth = 1113
    99  DesignTimePPI = 144
    10   LCLVersion = '2.2.2.0'
     10  LCLVersion = '2.2.6.0'
    1111  object ListView1: TListView
    1212    Left = 0
  • branches/CpuSingleSize/Forms/FormMessages.pas

    r237 r238  
    1 unit UFormMessages;
     1unit FormMessages;
    22
    33interface
     
    77
    88type
     9  TSelectEvent = procedure (Position: TPoint) of object;
    910
    1011  { TFormMessages }
     
    1516    procedure ListView1DblClick(Sender: TObject);
    1617  private
     18    FOnSelect: TSelectEvent;
    1719  public
    1820    procedure Reload;
     21    property OnSelect: TSelectEvent read FOnSelect write FOnSelect;
    1922  end;
    20 
    21 var
    22   FormMessages: TFormMessages;
    2323
    2424
     
    2828
    2929uses
    30   UCore, UMessages, UFormAssembler;
     30  Core, Message, FormAssembler;
    3131
    3232{ TFormMessages }
     
    3434procedure TFormMessages.ListView1Data(Sender: TObject; Item: TListItem);
    3535begin
    36   with Core.Assembler do
    37   if (Item.Index >= 0) and (Item.Index < Messages.Count) then
    38   with TMessage(Messages[Item.Index]) do begin
     36  with Core.Core.Assembler do
     37  if (Item.Index >= 0) and (Item.Index < Message.Count) then
     38  with TMessage(Message[Item.Index]) do begin
    3939    Item.Caption := IntToStr(Position.X) + ', ' + IntToStr(Position.Y);
    40     Item.Data := Messages[Item.Index];
     40    Item.Data := Message[Item.Index];
    4141    Item.SubItems.Add(Text);
    4242  end;
     
    4646begin
    4747  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);
    5150  end;
    5251end;
     
    5453procedure TFormMessages.Reload;
    5554begin
    56   ListView1.Items.Count := Core.Assembler.Messages.Count;
     55  ListView1.Items.Count := Core.Core.Assembler.Message.Count;
    5756  ListView1.Refresh;
    5857end;
    5958
    60 
    6159end.
    6260
  • branches/CpuSingleSize/Forms/FormScreen.lfm

    r237 r238  
    1010  OnCreate = FormCreate
    1111  OnDestroy = FormDestroy
    12   LCLVersion = '2.2.2.0'
     12  LCLVersion = '2.2.6.0'
    1313  object PaintBox1: TPaintBox
    1414    Left = 8
  • branches/CpuSingleSize/Forms/FormScreen.pas

    r237 r238  
    1 unit UFormScreen;
     1unit FormScreen;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, UMachine;
     6  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, Machine;
    77
    88type
     
    2626  end;
    2727
    28 var
    29   FormScreen: TFormScreen;
    3028
    3129implementation
     
    7977procedure TFormScreen.FormDestroy(Sender: TObject);
    8078begin
    81   TempBitmap.Free;
     79  FreeAndNil(TempBitmap);
    8280end;
    8381
  • branches/CpuSingleSize/Forms/FormStorage.lfm

    r237 r238  
    88  ClientWidth = 1153
    99  DesignTimePPI = 144
    10   LCLVersion = '2.2.2.0'
     10  LCLVersion = '2.2.6.0'
    1111  object ListView1: TListView
    1212    Left = 17
  • branches/CpuSingleSize/Forms/FormStorage.pas

    r237 r238  
    1 unit UFormStorage;
     1unit FormStorage;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, UMachine;
     6  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, Machine;
    77
    88type
     
    1919  end;
    2020
    21 var
    22   FormStorage: TFormStorage;
    2321
    2422implementation
  • branches/CpuSingleSize/Instructions.pas

    r237 r238  
    1 unit UInstructions;
     1unit Instructions;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, Generics.Collections, UCpu;
     6  Classes, SysUtils, Generics.Collections, Cpu;
    77
    88type
  • branches/CpuSingleSize/Machine.pas

    r237 r238  
    1 unit UMachine;
     1unit Machine;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, UCpu, Syncobjs, UMemory, Generics.Collections, Forms;
     6  Classes, SysUtils, Cpu, Syncobjs, Memory, Generics.Collections, Forms;
    77
    88type
     
    3434    InterruptVector: Integer;
    3535    Form: TFormDevice;
     36    destructor Destroy; override;
    3637    procedure PulseInterrupt;
    3738    procedure OutputHandler(Port, Data: TInteger); virtual;
     
    250251{ TDevice }
    251252
     253destructor TDevice.Destroy;
     254begin
     255  if Assigned(Form) then FreeAndNil(Form);
     256  inherited;
     257end;
     258
    252259procedure TDevice.PulseInterrupt;
    253260begin
     
    497504begin
    498505  PowerOff;
     506  FreeAndNil(Cpu);
     507  FreeAndNil(Memory);
    499508  FreeAndNil(Devices);
    500509  inherited;
  • branches/CpuSingleSize/Memory.pas

    r237 r238  
    1 unit UMemory;
     1unit Memory;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, UCpu;
     6  Classes, SysUtils, Cpu;
    77
    88type
  • branches/CpuSingleSize/Message.pas

    r237 r238  
    1 unit UMessages;
     1unit Message;
    22
    33interface
  • branches/CpuSingleSize/Parser.pas

    r237 r238  
    1 unit UParser;
     1unit Parser;
    22
    33interface
  • branches/CpuSingleSize/Project.pas

    r237 r238  
    1 unit UProject;
     1unit Project;
    22
    33interface
Note: See TracChangeset for help on using the changeset viewer.