]> git.sur5r.net Git - cc65/commitdiff
Some cleanup
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 15 Jun 2004 20:05:54 +0000 (20:05 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 15 Jun 2004 20:05:54 +0000 (20:05 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3127 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/codeent.c
src/cc65/opcodes.c
src/cc65/opcodes.h

index 233080712a6d795e0554d671c95b740e9a20d60c..5f2b3f1eef943253ec1feea688f22cb57fad58d6 100644 (file)
@@ -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 */
index 2b4354a881b6c7151248d5cf5b7a1c37fbba0137..781043d86e176be56f1bee53bb415e4bbcce1703 100644 (file)
@@ -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 );
 }
 
index 89a7c4117ee417dd30f05f69c32c716ee8fe9436..064b573c11a8b33ffcab5144e6d60610ab464b5f 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 */
@@ -205,7 +190,7 @@ typedef struct {
 } OPCDesc;
 
 /* Opcode description table */
-extern const OPCDesc OPCTable[OPCODE_COUNT];
+extern const OPCDesc OPCTable[OP65_COUNT];