/* */
/* */
/* */
-/* (C) 2001 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,
OP65_STA,
OP65_STX,
OP65_STY,
+ OP65_STZ,
OP65_TAX,
OP65_TAY,
OP65_TRB,
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 */
#define OF_CALL 0x0200U /* A subroutine call */
#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 */
opc_t OPC; /* Opcode */
char Mnemo[9]; /* Mnemonic */
unsigned char Size; /* Size, 0 = check addressing mode */
- unsigned char Use; /* Registers used by this insn */
- unsigned char Chg; /* Registers changed by this insn */
+ unsigned short Use; /* Registers used by this insn */
+ unsigned short Chg; /* Registers changed by this insn */
unsigned short Info; /* Additional information */
} OPCDesc;
/* Opcode description table */
-extern const OPCDesc OPCTable[OPCODE_COUNT];
+extern const OPCDesc OPCTable[OP65_COUNT];