summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/sc61860/scdasm.h
blob: 575106ac2c8d13cc96d5cddb066aed9b8762eae2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// license:BSD-3-Clause
// copyright-holders:Peter Trauner
/*****************************************************************************
 *
 *   scdasm.c
 *   portable sharp 61860 emulator interface
 *   (sharp pocket computers)
 *
 *   Copyright Peter Trauner, all rights reserved.
 *
 *****************************************************************************/

#ifndef MAME_CPU_SC61860_SCDASM_H
#define MAME_CPU_SC61860_SCDASM_H

#pragma once

class sc61860_disassembler : public util::disasm_interface
{
public:
	sc61860_disassembler() = default;
	virtual ~sc61860_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 &params) override;

private:
	enum Adr
	{
		Ill,
		Imp,
		Imm, ImmW,
		RelP, RelM,
		Abs,
		Ptc,
		Etc,
		Cal,
		Lp
	};

	struct opcode {
		const char *mnemonic;
		Adr adr;
	};

	static const opcode table[];

};

#endif