]> git.sur5r.net Git - cc65/blobdiff - src/cc65/opcodes.h
Change the OptStackOps function so that it adjusts the instruction pointer
[cc65] / src / cc65 / opcodes.h
index 89a7c4117ee417dd30f05f69c32c716ee8fe9436..fb9e3e53e32244b00e593cadb43e60b441c37a7a 100644 (file)
@@ -6,9 +6,9 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2001-2002 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
+/* (C) 2001-2004 Ullrich von Bassewitz                                       */
+/*               Römerstraße 52                                              */
+/*               D-70794 Filderstadt                                         */
 /* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
 /*                                                                           */
 
 
 
-/* Definitions for the possible opcodes */
+/* 65XX opcodes */
 typedef enum {
-
-    /* 65XX opcodes */
     OP65_ADC,
     OP65_AND,
     OP65_ASL,
@@ -129,24 +127,11 @@ typedef enum {
     OP65_TYA,
 
     /* Number of opcodes available */
-    OPCODE_COUNT,
-
-    /* Several other opcode information constants */
-    OP65_FIRST = OP65_ADC,
-    OP65_LAST  = OP65_TYA,
-    OP65_COUNT = OP65_LAST - OP65_FIRST + 1
+    OP65_COUNT
 } opc_t;
 
-/* Addressing modes */
+/* 65XX addressing modes */
 typedef enum {
-
-    /* Addressing modes of the virtual stack machine */
-    AM_IMP,
-    AM_IMM,
-    AM_STACK,
-    AM_ABS,
-
-    /* 65XX addressing modes */
     AM65_IMP,                  /* implicit */
     AM65_ACC,                  /* accumulator */
     AM65_IMM,                  /* immidiate */
@@ -189,6 +174,7 @@ typedef enum {
 #define OF_REG_INCDEC   0x0400U /* A register increment or decrement */
 #define OF_SETF         0x0800U /* Insn will set all load flags (not carry) */
 #define OF_CMP          0x1000U /* A compare A/X/Y instruction */
+#define OF_NOIMP        0x2000U /* Implicit addressing mode is actually A */
 
 /* Combined infos */
 #define OF_BRA         (OF_UBRA | OF_CBRA)     /* Operation is a jump/branch */
@@ -205,7 +191,7 @@ typedef struct {
 } OPCDesc;
 
 /* Opcode description table */
-extern const OPCDesc OPCTable[OPCODE_COUNT];
+extern const OPCDesc OPCTable[OP65_COUNT];