/* */
/* */
/* */
-/* (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"
/* Table with target names */
const char* CPUNames[CPU_COUNT] = {
+ "none",
"6502",
"6502X",
"65SC02",
/* 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,
/* 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;
}
}
/* */
/* */
/* */
-/* (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 */
/* 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,
/* 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,
/* Code */
/*****************************************************************************/
-
+
cpu_t FindCPU (const char* Name);
/* Find a CPU by name and return the target id. CPU_UNKNOWN is returned if