Changeset 112 for trunk/Forms


Ignore:
Timestamp:
May 17, 2019, 10:06:59 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Redraw output form content only if output instruction was used in interpretter mode.
  • Modified: Redraw memory form content only if memory was written in interpretter mode.
  • Fixed: Replace windows newlines by unix newlines in interpretter output under Linux.
Location:
trunk/Forms
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMemory.lfm

    r103 r112  
    88  ClientWidth = 586
    99  DesignTimePPI = 144
    10   LCLVersion = '2.0.0.4'
     10  LCLVersion = '2.0.2.0'
    1111  object Label6: TLabel
    1212    Left = 6
    13     Height = 25
     13    Height = 26
    1414    Top = 6
    1515    Width = 574
     
    2222  object ListViewMemory: TListView
    2323    Left = 6
    24     Height = 345
    25     Top = 37
     24    Height = 344
     25    Top = 38
    2626    Width = 574
    2727    Align = alClient
  • trunk/Forms/UFormMemory.pas

    r78 r112  
    4242  if Core.CurrentTarget is TTargetInterpretter then
    4343  with TTargetInterpretter(Core.CurrentTarget) do begin
    44     ListViewMemory.Items.Count := Ceil(MemoryMaxUsed / RowSize);
    45     ListViewMemory.Refresh;
     44    if MemoryChanged then begin
     45      MemoryChanged := False;
     46      ListViewMemory.Items.Count := Ceil((MemoryMaxUsedAddr + 1) / RowSize);
     47      ListViewMemory.Refresh;
     48    end;
    4649  end;
    4750end;
     
    5457  if Core.CurrentTarget is TTargetInterpretter then
    5558  with TTargetInterpretter(Core.CurrentTarget) do
    56   if (Item.Index >= 0) and (Item.Index <= Trunc(MemoryMaxUsed / RowSize)) then begin
     59  if (Item.Index >= 0) and (Item.Index <= Trunc((MemoryMaxUsedAddr + 1) / RowSize)) then begin
    5760    Item.Caption := IntToHex(Item.Index * RowSize, 8);
    5861    Row := '';
    5962    for I := 0 to RowSize - 1 do
    60       if (Item.Index * RowSize + I) < MemoryMaxUsed then
     63      if (Item.Index * RowSize + I) < (MemoryMaxUsedAddr + 1) then
    6164        Row := Row + ' ' + IntToHex(Memory[Item.Index * RowSize + I], 2);
    6265    Item.SubItems.Add(Row);
  • trunk/Forms/UFormOutput.lfm

    r103 r112  
    11object FormOutput: TFormOutput
    2   Left = 256
    3   Height = 440
    4   Top = 32
    5   Width = 320
     2  Left = 736
     3  Height = 343
     4  Top = 502
     5  Width = 640
    66  Caption = 'Output'
    7   ClientHeight = 440
    8   ClientWidth = 320
     7  ClientHeight = 343
     8  ClientWidth = 640
    99  DesignTimePPI = 144
    10   LCLVersion = '2.0.0.4'
     10  LCLVersion = '2.0.2.0'
    1111  object Label2: TLabel
    1212    Left = 4
    13     Height = 25
     13    Height = 26
    1414    Top = 4
    15     Width = 312
     15    Width = 632
    1616    Align = alTop
    1717    BorderSpacing.Around = 4
     
    2121  object MemoOutput: TMemo
    2222    Left = 4
    23     Height = 403
    24     Top = 33
    25     Width = 312
     23    Height = 305
     24    Top = 34
     25    Width = 632
    2626    Align = alClient
    2727    BorderSpacing.Around = 4
  • trunk/Forms/UFormOutput.pas

    r100 r112  
    3737  if Core.CurrentTarget is TTargetInterpretter then
    3838  with TTargetInterpretter(Core.CurrentTarget) do begin
    39     MemoOutput.Lines.Text := Output;
     39    if OutputChanged then begin
     40      OutputChanged := False;
     41      {$IFDEF LINUX}
     42      MemoOutput.Lines.Text := StringReplace(Output, #10#13, LineEnding, [rfReplaceAll])
     43      {$ELSE}
     44      MemoOutput.Lines.Text := Output;
     45      {$ENDIF}
     46    end;
    4047  end;
    4148end;
Note: See TracChangeset for help on using the changeset viewer.