1
0
mirror of https://github.com/cc65/cc65.git synced 2024-10-01 15:54:59 +00:00

Added "none" CPU.

git-svn-id: svn://svn.cc65.org/cc65/trunk@3591 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2005-08-26 12:44:25 +00:00
parent ddddb2acb5
commit e016695787
2 changed files with 15 additions and 12 deletions

View 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 */
@ -33,10 +33,9 @@
#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;
}
}

View 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