From e016695787d63f77c29f9fe43e257a4fa560308a Mon Sep 17 00:00:00 2001 From: cuz Date: Fri, 26 Aug 2005 12:44:25 +0000 Subject: [PATCH] Added "none" CPU. git-svn-id: svn://svn.cc65.org/cc65/trunk@3591 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/cpu.c | 15 ++++++++------- src/common/cpu.h | 12 +++++++----- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/common/cpu.c b/src/common/cpu.c index 52ad2bb5b..b2ed0a0c5 100644 --- a/src/common/cpu.c +++ b/src/common/cpu.c @@ -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 */ @@ -33,10 +33,9 @@ -#include - /* 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; } } diff --git a/src/common/cpu.h b/src/common/cpu.h index f9720bd45..4217915bb 100644 --- a/src/common/cpu.h +++ b/src/common/cpu.h @@ -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 -- 2.39.5