EightBit/MC6809/inc/Disassembly.h
Adrian Conlon a22c5a5c78 Add skeletal disassembler to the 6809 processor.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-08-26 19:08:07 +01:00

33 lines
740 B
C++

#pragma once
#include <cstdint>
#include <string>
#include "mc6809.h"
namespace EightBit {
class Disassembly {
public:
Disassembly(mc6809& processor);
std::string disassemble(uint16_t current) const;
static std::string dump_Flags(uint8_t value);
static std::string dump_ByteValue(uint8_t value);
static std::string dump_WordValue(uint16_t value);
private:
mc6809& processor;
mutable uint16_t m_address = 0xffff;
static void dump(std::ostream& out, int value, int width);
uint8_t getByte(uint16_t address) const;
uint16_t getWord(uint16_t address) const;
std::string dump_Byte(uint16_t address) const;
std::string dump_DByte(uint16_t address) const;
std::string dump_Word(uint16_t address) const;
};
}