mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-26 19:29:20 +00:00
8143f8a506
1) No forward declarations 2) No virtual methods defined inline. Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <sstream>
|
|
#include <boost/format.hpp>
|
|
|
|
#include <Intel8080.h>
|
|
|
|
namespace EightBit {
|
|
class Disassembler {
|
|
public:
|
|
Disassembler();
|
|
|
|
static std::string state(Intel8080& cpu);
|
|
std::string disassemble(Intel8080& cpu);
|
|
|
|
static std::string flag(uint8_t value, int flag, std::string represents, std::string off = "-");
|
|
static std::string flags(uint8_t value);
|
|
static std::string hex(uint8_t value);
|
|
static std::string hex(uint16_t value);
|
|
static std::string binary(uint8_t value);
|
|
|
|
static std::string invalid(uint8_t value);
|
|
|
|
private:
|
|
mutable boost::format m_formatter;
|
|
|
|
void disassemble(std::ostringstream& output, Intel8080& cpu, uint16_t pc);
|
|
|
|
void disassemble(
|
|
std::ostringstream& output,
|
|
const Intel8080& cpu,
|
|
uint16_t pc,
|
|
std::string& specification,
|
|
int& dumpCount,
|
|
int x, int y, int z,
|
|
int p, int q);
|
|
|
|
std::string RP(int rp) const;
|
|
std::string RP2(int rp) const;
|
|
std::string R(int r) const;
|
|
static std::string cc(int flag);
|
|
static std::string alu(int which);
|
|
static std::string alu2(int which);
|
|
};
|
|
} |