Added "none" CPU.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3591 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
ddddb2acb5
commit
e016695787
2 changed files with 15 additions and 12 deletions
|
@ -6,10 +6,10 @@
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 2003-2004 Ullrich von Bassewitz */
|
/* (C) 2003-2005, Ullrich von Bassewitz */
|
||||||
/* Römerstrasse 52 */
|
/* Römerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* This software is provided 'as-is', without any expressed or implied */
|
/* This software is provided 'as-is', without any expressed or implied */
|
||||||
|
@ -33,10 +33,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/* common */
|
/* common */
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
#include "strutil.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,6 +50,7 @@ cpu_t CPU = CPU_UNKNOWN;
|
||||||
|
|
||||||
/* Table with target names */
|
/* Table with target names */
|
||||||
const char* CPUNames[CPU_COUNT] = {
|
const char* CPUNames[CPU_COUNT] = {
|
||||||
|
"none",
|
||||||
"6502",
|
"6502",
|
||||||
"6502X",
|
"6502X",
|
||||||
"65SC02",
|
"65SC02",
|
||||||
|
@ -62,6 +62,7 @@ const char* CPUNames[CPU_COUNT] = {
|
||||||
|
|
||||||
/* Tables with CPU instruction sets */
|
/* Tables with CPU instruction sets */
|
||||||
const unsigned CPUIsets[CPU_COUNT] = {
|
const unsigned CPUIsets[CPU_COUNT] = {
|
||||||
|
CPU_ISET_NONE,
|
||||||
CPU_ISET_6502,
|
CPU_ISET_6502,
|
||||||
CPU_ISET_6502 | CPU_ISET_6502X,
|
CPU_ISET_6502 | CPU_ISET_6502X,
|
||||||
CPU_ISET_6502 | CPU_ISET_65SC02,
|
CPU_ISET_6502 | CPU_ISET_65SC02,
|
||||||
|
@ -88,7 +89,7 @@ cpu_t FindCPU (const char* Name)
|
||||||
|
|
||||||
/* Check all CPU names */
|
/* Check all CPU names */
|
||||||
for (I = 0; I < CPU_COUNT; ++I) {
|
for (I = 0; I < CPU_COUNT; ++I) {
|
||||||
if (strcmp (CPUNames [I], Name) == 0) {
|
if (StrCaseCmp (CPUNames [I], Name) == 0) {
|
||||||
return (cpu_t)I;
|
return (cpu_t)I;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 2003-2004 Ullrich von Bassewitz */
|
/* (C) 2003-2005, Ullrich von Bassewitz */
|
||||||
/* Römerstrasse 52 */
|
/* Römerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* This software is provided 'as-is', without any expressed or implied */
|
/* This software is provided 'as-is', without any expressed or implied */
|
||||||
|
@ -47,6 +47,7 @@
|
||||||
/* CPUs */
|
/* CPUs */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CPU_UNKNOWN = -1, /* Not specified or invalid target */
|
CPU_UNKNOWN = -1, /* Not specified or invalid target */
|
||||||
|
CPU_NONE, /* No CPU - for assembler */
|
||||||
CPU_6502,
|
CPU_6502,
|
||||||
CPU_6502X, /* "Extended", that is: with illegal opcodes */
|
CPU_6502X, /* "Extended", that is: with illegal opcodes */
|
||||||
CPU_65SC02,
|
CPU_65SC02,
|
||||||
|
@ -59,6 +60,7 @@ typedef enum {
|
||||||
|
|
||||||
/* CPU instruction sets */
|
/* CPU instruction sets */
|
||||||
enum {
|
enum {
|
||||||
|
CPU_ISET_NONE = 1 << CPU_NONE,
|
||||||
CPU_ISET_6502 = 1 << CPU_6502,
|
CPU_ISET_6502 = 1 << CPU_6502,
|
||||||
CPU_ISET_6502X = 1 << CPU_6502X,
|
CPU_ISET_6502X = 1 << CPU_6502X,
|
||||||
CPU_ISET_65SC02 = 1 << CPU_65SC02,
|
CPU_ISET_65SC02 = 1 << CPU_65SC02,
|
||||||
|
@ -83,7 +85,7 @@ extern const unsigned CPUIsets[CPU_COUNT];
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cpu_t FindCPU (const char* Name);
|
cpu_t FindCPU (const char* Name);
|
||||||
/* Find a CPU by name and return the target id. CPU_UNKNOWN is returned if
|
/* Find a CPU by name and return the target id. CPU_UNKNOWN is returned if
|
||||||
|
|
Loading…
Add table
Reference in a new issue