1
0
mirror of https://github.com/cc65/cc65.git synced 2025-08-08 06:25:17 +00:00

Some cleanup

git-svn-id: svn://svn.cc65.org/cc65/trunk@3127 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2004-06-15 20:05:54 +00:00
parent ddf012b94d
commit a3e6fbd21f
3 changed files with 10 additions and 28 deletions

View File

@@ -1373,7 +1373,6 @@ void CE_Output (const CodeEntry* E, FILE* F)
/* Print the operand */ /* Print the operand */
switch (E->AM) { switch (E->AM) {
case AM_IMP:
case AM65_IMP: case AM65_IMP:
/* implicit */ /* implicit */
break; break;
@@ -1383,13 +1382,11 @@ void CE_Output (const CodeEntry* E, FILE* F)
Chars += fprintf (F, "%*sa", 9-Chars, ""); Chars += fprintf (F, "%*sa", 9-Chars, "");
break; break;
case AM_IMM:
case AM65_IMM: case AM65_IMM:
/* immidiate */ /* immidiate */
Chars += fprintf (F, "%*s#%s", 9-Chars, "", E->Arg); Chars += fprintf (F, "%*s#%s", 9-Chars, "", E->Arg);
break; break;
case AM_ABS:
case AM65_ZP: case AM65_ZP:
case AM65_ABS: case AM65_ABS:
/* zeropage and absolute */ /* zeropage and absolute */

View File

@@ -6,7 +6,7 @@
/* */ /* */
/* */ /* */
/* */ /* */
/* (C) 2001-2003 Ullrich von Bassewitz */ /* (C) 2001-2004 Ullrich von Bassewitz */
/* R<>merstra<72>e 52 */ /* R<>merstra<72>e 52 */
/* D-70794 Filderstadt */ /* D-70794 Filderstadt */
/* EMail: uz@cc65.org */ /* EMail: uz@cc65.org */
@@ -55,7 +55,7 @@
/* Opcode description table */ /* Opcode description table */
const OPCDesc OPCTable[OPCODE_COUNT] = { const OPCDesc OPCTable[OP65_COUNT] = {
/* 65XX opcodes */ /* 65XX opcodes */
{ OP65_ADC, /* opcode */ { OP65_ADC, /* opcode */
@@ -620,7 +620,7 @@ const OPCDesc* FindOP65 (const char* M)
Mnemo[I] = '\0'; Mnemo[I] = '\0';
/* Search for the mnemonic in the table and return the result */ /* 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 ); sizeof (OPCTable[0]), FindCmp );
} }

View File

@@ -6,9 +6,9 @@
/* */ /* */
/* */ /* */
/* */ /* */
/* (C) 2001-2002 Ullrich von Bassewitz */ /* (C) 2001-2004 Ullrich von Bassewitz */
/* Wacholderweg 14 */ /* R<EFBFBD>merstra<EFBFBD>e 52 */
/* D-70597 Stuttgart */ /* D-70794 Filderstadt */
/* EMail: uz@cc65.org */ /* EMail: uz@cc65.org */
/* */ /* */
/* */ /* */
@@ -49,10 +49,8 @@
/* Definitions for the possible opcodes */ /* 65XX opcodes */
typedef enum { typedef enum {
/* 65XX opcodes */
OP65_ADC, OP65_ADC,
OP65_AND, OP65_AND,
OP65_ASL, OP65_ASL,
@@ -129,24 +127,11 @@ typedef enum {
OP65_TYA, OP65_TYA,
/* Number of opcodes available */ /* Number of opcodes available */
OPCODE_COUNT, OP65_COUNT
/* Several other opcode information constants */
OP65_FIRST = OP65_ADC,
OP65_LAST = OP65_TYA,
OP65_COUNT = OP65_LAST - OP65_FIRST + 1
} opc_t; } opc_t;
/* Addressing modes */ /* 65XX addressing modes */
typedef enum { typedef enum {
/* Addressing modes of the virtual stack machine */
AM_IMP,
AM_IMM,
AM_STACK,
AM_ABS,
/* 65XX addressing modes */
AM65_IMP, /* implicit */ AM65_IMP, /* implicit */
AM65_ACC, /* accumulator */ AM65_ACC, /* accumulator */
AM65_IMM, /* immidiate */ AM65_IMM, /* immidiate */
@@ -205,7 +190,7 @@ typedef struct {
} OPCDesc; } OPCDesc;
/* Opcode description table */ /* Opcode description table */
extern const OPCDesc OPCTable[OPCODE_COUNT]; extern const OPCDesc OPCTable[OP65_COUNT];