Base code for handling different CPUs, more improvements
git-svn-id: svn://svn.cc65.org/cc65/trunk@2253 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2000 Ullrich von Bassewitz */
|
||||
/* Wacholderweg 14 */
|
||||
/* D-70597 Stuttgart */
|
||||
/* EMail: uz@musoftware.de */
|
||||
/* (C) 2000-2003 Ullrich von Bassewitz */
|
||||
/* R<EFBFBD>merstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
@@ -38,37 +38,33 @@
|
||||
|
||||
|
||||
|
||||
/* common */
|
||||
#include "cpu.h"
|
||||
|
||||
/* da65 */
|
||||
#include "opcdesc.h"
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* Constants for LabelFlag */
|
||||
enum {
|
||||
lfNoLabel = 0x00, /* Don't use a label */
|
||||
lfGenLabel = 0x01, /* Generate a label */
|
||||
lfUseLabel = 0x02, /* Use a label if there is one */
|
||||
lfLabel = lfUseLabel|lfGenLabel /* Generate and use a label */
|
||||
};
|
||||
|
||||
/* Forward/typedef for struct OpcDesc */
|
||||
typedef struct OpcDesc OpcDesc;
|
||||
|
||||
/* Type of pointer to a function that handles opcode output */
|
||||
typedef void (*OpcHandler) (const OpcDesc*);
|
||||
|
||||
/* Description for one opcode */
|
||||
struct OpcDesc {
|
||||
char Mnemo [4]; /* Mnemonic */
|
||||
unsigned char Size; /* Size of this command */
|
||||
unsigned char LabelFlag; /* Generate/use label? */
|
||||
unsigned char CPU; /* Available for which CPU? */
|
||||
OpcHandler Handler; /* Handler routine */
|
||||
};
|
||||
|
||||
/* Descriptions for all opcodes */
|
||||
extern const OpcDesc OpcTable[256];
|
||||
extern const OpcDesc* OpcTable;
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
void SetOpcTable (cpu_t CPU);
|
||||
/* Set the correct opcode table for the given CPU */
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user