2012-02-27 21:14:46 +00:00
|
|
|
// ACME - a crossassembler for producing 6502/65c02/65816 code.
|
2014-03-10 00:17:10 +00:00
|
|
|
// Copyright (C) 1998-2014 Marco Baye
|
2012-02-27 21:14:46 +00:00
|
|
|
// Have a look at "acme.c" for further info
|
|
|
|
//
|
2014-03-11 14:22:32 +00:00
|
|
|
// CPU type stuff
|
|
|
|
#ifndef cpu_type_H
|
|
|
|
#define cpu_type_H
|
2012-02-27 21:14:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
|
|
|
|
// CPU type structure definition
|
2014-03-10 00:17:10 +00:00
|
|
|
struct cpu_type {
|
2012-02-27 21:14:46 +00:00
|
|
|
// This function is not allowed to change GlobalDynaBuf
|
|
|
|
// because that's where the mnemonic is stored!
|
|
|
|
int (*keyword_is_mnemonic)(int);
|
2014-03-11 14:22:32 +00:00
|
|
|
int flags; // see below for bit meanings
|
2012-02-27 21:14:46 +00:00
|
|
|
char default_align_value;
|
|
|
|
};
|
2014-03-10 00:17:10 +00:00
|
|
|
#define CPUFLAG_INDIRECTJMPBUGGY (1u << 0) // warn if "jmp ($xxff)" is assembled
|
|
|
|
#define CPUFLAG_SUPPORTSLONGREGS (1u << 1) // allow "!al" and "!rl" pseudo opcodes
|
2014-11-25 23:57:15 +00:00
|
|
|
#define CPUFLAG_8B_AND_AB_NEED_0_ARG (1u << 2) // warn if "ane/lxa #$xx" uses non-zero arg
|
2014-03-10 00:17:10 +00:00
|
|
|
|
|
|
|
|
2012-02-27 21:14:46 +00:00
|
|
|
// register pseudo opcodes (done later)
|
|
|
|
extern void CPU_init(void);
|
2014-03-11 14:22:32 +00:00
|
|
|
// set default value for pass
|
2014-03-10 00:17:10 +00:00
|
|
|
extern void CPU_passinit(const struct cpu_type *cpu_type);
|
2012-02-27 21:14:46 +00:00
|
|
|
// try to find CPU type held in DynaBuf. Returns whether succeeded.
|
2014-03-10 00:17:10 +00:00
|
|
|
// FIXME - why not simply return struct ptr, or NULL in case of failure?
|
|
|
|
extern int CPU_find_cpu_struct(const struct cpu_type **target);
|
2012-02-27 21:14:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|