diff --git a/src/cc65/codeent.c b/src/cc65/codeent.c index 233080712..5f2b3f1ee 100644 --- a/src/cc65/codeent.c +++ b/src/cc65/codeent.c @@ -1373,7 +1373,6 @@ void CE_Output (const CodeEntry* E, FILE* F) /* Print the operand */ switch (E->AM) { - case AM_IMP: case AM65_IMP: /* implicit */ break; @@ -1383,13 +1382,11 @@ void CE_Output (const CodeEntry* E, FILE* F) Chars += fprintf (F, "%*sa", 9-Chars, ""); break; - case AM_IMM: case AM65_IMM: /* immidiate */ Chars += fprintf (F, "%*s#%s", 9-Chars, "", E->Arg); break; - case AM_ABS: case AM65_ZP: case AM65_ABS: /* zeropage and absolute */ diff --git a/src/cc65/opcodes.c b/src/cc65/opcodes.c index 2b4354a88..781043d86 100644 --- a/src/cc65/opcodes.c +++ b/src/cc65/opcodes.c @@ -6,7 +6,7 @@ /* */ /* */ /* */ -/* (C) 2001-2003 Ullrich von Bassewitz */ +/* (C) 2001-2004 Ullrich von Bassewitz */ /* Römerstraße 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ @@ -55,7 +55,7 @@ /* Opcode description table */ -const OPCDesc OPCTable[OPCODE_COUNT] = { +const OPCDesc OPCTable[OP65_COUNT] = { /* 65XX opcodes */ { OP65_ADC, /* opcode */ @@ -620,7 +620,7 @@ const OPCDesc* FindOP65 (const char* M) Mnemo[I] = '\0'; /* Search for the mnemonic in the table and return the result */ - return bsearch (Mnemo, OPCTable+OP65_FIRST, OP65_COUNT, + return bsearch (Mnemo, OPCTable, OP65_COUNT, sizeof (OPCTable[0]), FindCmp ); } diff --git a/src/cc65/opcodes.h b/src/cc65/opcodes.h index 89a7c4117..064b573c1 100644 --- a/src/cc65/opcodes.h +++ b/src/cc65/opcodes.h @@ -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 */ /* */ /* */ @@ -49,10 +49,8 @@ -/* 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 */ @@ -205,7 +190,7 @@ typedef struct { } OPCDesc; /* Opcode description table */ -extern const OPCDesc OPCTable[OPCODE_COUNT]; +extern const OPCDesc OPCTable[OP65_COUNT];