diff options
Diffstat (limited to 'src/devices/cpu/s2650/2650dasm.h')
-rw-r--r-- | src/devices/cpu/s2650/2650dasm.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/devices/cpu/s2650/2650dasm.h b/src/devices/cpu/s2650/2650dasm.h new file mode 100644 index 00000000000..bf9523255cc --- /dev/null +++ b/src/devices/cpu/s2650/2650dasm.h @@ -0,0 +1,48 @@ +// license:BSD-3-Clause +// copyright-holders:Juergen Buchmueller +/*************************************************************************** + * + * Portable Signetics 2650 disassembler + * + * Written by J. Buchmueller (pullmoll@t-online.de) + * for the MAME project + * + **************************************************************************/ + +#ifndef MAME_CPU_S2650_2650DASM_H +#define MAME_CPU_S2650_2650DASM_H + +#pragma once + +class s2650_disassembler : public util::disasm_interface +{ +public: + struct config { + virtual ~config() = default; + virtual bool get_z80_mnemonics_mode() const = 0; + }; + + s2650_disassembler(config *conf); + virtual ~s2650_disassembler() = default; + + virtual u32 opcode_alignment() const override; + virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) override; + +private: + static const int rel[0x100]; + static const char cc[4]; + + void add(std::string &buf, std::string str); + std::string SYM(int addr); + std::string IMM(offs_t pc, const data_buffer ¶ms); + std::string IMM_PSL(offs_t pc, const data_buffer ¶ms); + std::string IMM_PSU(offs_t pc, const data_buffer ¶ms); + std::string REL(offs_t pc, const data_buffer ¶ms); + std::string REL0(offs_t pc, const data_buffer ¶ms); + std::string ABS(int load, int r, offs_t pc, const data_buffer ¶ms); + std::string ADR(offs_t pc, const data_buffer ¶ms); + + config *m_config; +}; + +#endif |