]> git.sur5r.net Git - cc65/commitdiff
Added "none" CPU.
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 26 Aug 2005 12:44:25 +0000 (12:44 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 26 Aug 2005 12:44:25 +0000 (12:44 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3591 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/common/cpu.c
src/common/cpu.h

index 52ad2bb5bff8a8d8d0740e92694d08ff75e5d1fb..b2ed0a0c57a7da444afbbacbce6355324c6f6a70 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2003-2004 Ullrich von Bassewitz                                       */
-/*               Römerstrasse 52                                             */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2003-2005, Ullrich von Bassewitz                                      */
+/*                Römerstrasse 52                                            */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 
 
-#include <string.h>
-
 /* common */
 #include "cpu.h"
+#include "strutil.h"
 
 
 
@@ -51,6 +50,7 @@ cpu_t CPU = CPU_UNKNOWN;
 
 /* Table with target names */
 const char* CPUNames[CPU_COUNT] = {
+    "none",
     "6502",
     "6502X",
     "65SC02",
@@ -62,6 +62,7 @@ const char* CPUNames[CPU_COUNT] = {
 
 /* Tables with CPU instruction sets */
 const unsigned CPUIsets[CPU_COUNT] = {
+    CPU_ISET_NONE,
     CPU_ISET_6502,
     CPU_ISET_6502 | CPU_ISET_6502X,
     CPU_ISET_6502 | CPU_ISET_65SC02,
@@ -88,7 +89,7 @@ cpu_t FindCPU (const char* Name)
 
     /* Check all CPU names */
     for (I = 0; I < CPU_COUNT; ++I) {
-       if (strcmp (CPUNames [I], Name) == 0) {
+       if (StrCaseCmp (CPUNames [I], Name) == 0) {
            return (cpu_t)I;
        }
     }
index f9720bd4567db8b3212bf6d71bc45fa6c2ae956f..4217915bb09758d3126706c28adbc289a7abbf9c 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2003-2004 Ullrich von Bassewitz                                       */
-/*               Römerstrasse 52                                             */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2003-2005, Ullrich von Bassewitz                                      */
+/*                Römerstrasse 52                                            */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -47,6 +47,7 @@
 /* CPUs */
 typedef enum {
     CPU_UNKNOWN = -1,           /* Not specified or invalid target */
+    CPU_NONE,                   /* No CPU - for assembler */
     CPU_6502,
     CPU_6502X,                  /* "Extended", that is: with illegal opcodes */
     CPU_65SC02,
@@ -59,6 +60,7 @@ typedef enum {
 
 /* CPU instruction sets */
 enum {
+    CPU_ISET_NONE       = 1 << CPU_NONE,
     CPU_ISET_6502       = 1 << CPU_6502,
     CPU_ISET_6502X      = 1 << CPU_6502X,
     CPU_ISET_65SC02     = 1 << CPU_65SC02,
@@ -83,7 +85,7 @@ extern const unsigned CPUIsets[CPU_COUNT];
 /*                                          Code                                    */
 /*****************************************************************************/
 
-                                           
+
 
 cpu_t FindCPU (const char* Name);
 /* Find a CPU by name and return the target id. CPU_UNKNOWN is returned if