Ignore:
Timestamp:
May 1, 2019, 9:48:46 PM (6 years ago)
Author:
chronos
Message:
  • Added: Assembler labels reference address calculation.
  • Fixed: Displaying address/data hex numbers in opcode and instruction.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/virtualcpu4/Forms/UFormAssembler.lfm

    r184 r185  
    11object FormAssembler: TFormAssembler
    22  Left = 474
    3   Height = 540
     3  Height = 648
    44  Top = 313
    5   Width = 705
     5  Width = 846
    66  Caption = 'Assembler'
    7   ClientHeight = 540
    8   ClientWidth = 705
    9   DesignTimePPI = 120
     7  ClientHeight = 648
     8  ClientWidth = 846
     9  DesignTimePPI = 144
    1010  OnCreate = FormCreate
    1111  OnDestroy = FormDestroy
    12   LCLVersion = '2.0.2.0'
     12  LCLVersion = '2.0.0.4'
    1313  object MemoSource: TMemo
    14     Left = 8
    15     Height = 383
    16     Top = 8
    17     Width = 691
     14    Left = 10
     15    Height = 459
     16    Top = 10
     17    Width = 829
    1818    Anchors = [akTop, akLeft, akRight, akBottom]
    1919    Lines.Strings = (
    20       'LD R1, R2'
    21       'LDI R1, 10'
     20      '  // Print Hello world text'
     21      '  LDI R1, HelloWorld'
     22      '  LDI R2, 13'
     23      '  CALL Print'
     24      '  HALT'
     25      ''
     26      'Print:'
     27      '  PUSH R3'
     28      '  PUSH R2'
     29      '  PUSH R1'
     30      'PrintLoop:'
     31      '  DP8 ;LDM R3, R1'
     32      '  AP8; DP8; OUT (0), R3'
     33      '  INC R1'
     34      '  DEC R2'
     35      '  TEST R2'
     36      '  AP8; JRNZ PrintLoop'
     37      '  POP R1'
     38      '  POP R2'
     39      '  POP R3'
     40      '  RET'
     41      'HelloWorld:'
     42      '  STRING ''Hello_World!'''
    2243    )
     44    ParentFont = False
    2345    ScrollBars = ssAutoBoth
    2446    TabOrder = 0
    2547  end
    2648  object ButtonLoadFromFile: TButton
    27     Left = 8
    28     Height = 31
    29     Top = 502
    30     Width = 136
     49    Left = 10
     50    Height = 37
     51    Top = 603
     52    Width = 163
    3153    Anchors = [akLeft, akBottom]
    3254    Caption = 'Load from file'
    3355    OnClick = ButtonLoadFromFileClick
     56    ParentFont = False
    3457    TabOrder = 1
    3558  end
    3659  object ButtonSaveToFile: TButton
    37     Left = 160
    38     Height = 31
    39     Top = 502
    40     Width = 128
     60    Left = 192
     61    Height = 37
     62    Top = 603
     63    Width = 154
    4164    Anchors = [akLeft, akBottom]
    4265    Caption = 'Save to file'
    4366    OnClick = ButtonSaveToFileClick
     67    ParentFont = False
    4468    TabOrder = 2
    4569  end
    4670  object ButtonCompile: TButton
    47     Left = 297
    48     Height = 31
    49     Top = 502
    50     Width = 126
     71    Left = 356
     72    Height = 37
     73    Top = 603
     74    Width = 151
    5175    Anchors = [akLeft, akBottom]
    5276    Caption = 'Compile'
    5377    OnClick = ButtonCompileClick
     78    ParentFont = False
    5479    TabOrder = 3
    5580  end
    5681  object MemoMessages: TMemo
    57     Left = 8
    58     Height = 97
    59     Top = 402
    60     Width = 689
     82    Left = 10
     83    Height = 116
     84    Top = 483
     85    Width = 826
    6186    Anchors = [akLeft, akRight, akBottom]
     87    ParentFont = False
    6288    ReadOnly = True
    6389    ScrollBars = ssAutoBoth
     
    6591  end
    6692  object OpenDialog1: TOpenDialog
    67     left = 114
    68     top = 152
     93    left = 137
     94    top = 182
    6995  end
    7096  object SaveDialog1: TSaveDialog
    71     left = 379
    72     top = 152
     97    left = 455
     98    top = 182
    7399  end
    74100end
Note: See TracChangeset for help on using the changeset viewer.