source: trunk/StudioModules/LDModuleDebug/UFormMemory.pas

Last change on this file was 5, checked in by chronos, 12 years ago
  • Added: LibreDevelopCommon package which supply API unit ULDStudioAPI.
  • Modified: Module LDStudioCommon now register forms, actions and menu items using API.
File size: 1.3 KB
Line 
1unit UFormMemory;
2
3{$mode delphi}
4
5interface
6
7uses
8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
9 ComCtrls;
10
11const
12 RowSize = 16;
13
14type
15
16 { TFormMemory }
17
18 TFormMemory = class(TForm)
19 Label6: TLabel;
20 ListViewMemory: TListView;
21 procedure ListViewMemoryData(Sender: TObject; Item: TListItem);
22 private
23 { private declarations }
24 public
25 procedure Reload;
26 end;
27
28var
29 FormMemory: TFormMemory;
30
31implementation
32
33{$R *.lfm}
34
35{ TFormMemory }
36
37procedure TFormMemory.Reload;
38begin
39{ if MainForm.CurrentTarget is TTargetInterpretter then
40 with TTargetInterpretter(MainForm.CurrentTarget) do begin
41 ListViewMemory.Items.Count := Trunc(Length(Memory) / RowSize);
42 ListViewMemory.Refresh;
43 end;}
44end;
45
46procedure TFormMemory.ListViewMemoryData(Sender: TObject; Item: TListItem);
47var
48 Row: string;
49 I: Integer;
50begin
51{ if MainForm.CurrentTarget is TTargetInterpretter then
52 with TTargetInterpretter(MainForm.CurrentTarget) do
53 if (Item.Index >= 0) and (Item.Index < Trunc(Length(Memory) / RowSize)) then begin
54 Item.Caption := IntToHex(Item.Index * RowSize, 8);
55 Row := '';
56 for I := 0 to RowSize - 1 do
57 Row := Row + ' ' + IntToHex(Memory[Item.Index * RowSize + I], 2);
58 Item.SubItems.Add(Row);
59 end;}
60end;
61
62
63end.
64
Note: See TracBrowser for help on using the repository browser.