Browse Source

+ added taddressmode enum to 6502's treference

Nikolay Nikolov 1 month ago
parent
commit
7b1d685763
2 changed files with 13 additions and 0 deletions
  1. 3 0
      compiler/cgutils.pas
  2. 10 0
      compiler/mos6502/cpubase.pas

+ 3 - 0
compiler/cgutils.pas

@@ -111,6 +111,9 @@ unit cgutils;
          indexoffset: aint;
          indexoffset: aint;
          checkcast: boolean;
          checkcast: boolean;
 {$endif jvm}
 {$endif jvm}
+{$ifdef mos6502}
+         addressmode : taddressmode;
+{$endif mos6502}
          volatility: tvolatilityset;
          volatility: tvolatilityset;
          alignment : byte;
          alignment : byte;
       end;
       end;

+ 10 - 0
compiler/mos6502/cpubase.pas

@@ -141,6 +141,16 @@ unit cpubase;
       TResFlags = (F_NotPossible,F_PL,F_MI,F_VC,F_VS,F_CC,F_CS,F_NE,F_EQ);
       TResFlags = (F_NotPossible,F_PL,F_MI,F_VC,F_VS,F_CC,F_CS,F_NE,F_EQ);
 
 
 
 
+{*****************************************************************************
+                                Operands
+*****************************************************************************}
+
+      taddressmode = (
+        AM_ABSOLUTE,   { Absolute / Absolute,X / Absolute,Y }
+        AM_ZEROPAGE,   { Zero Page / Zero Page,X / Zero Page,Y }
+        AM_INDIRECT);  { Indexed Indirect - ($40,X) / Indirect Indexed - ($40),Y }
+
+
 {*****************************************************************************
 {*****************************************************************************
                                  Constants
                                  Constants
 *****************************************************************************}
 *****************************************************************************}