Correct a couple of minor issues in the 6809 disassembler

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-08-28 18:28:00 +01:00
parent 52ad4e6996
commit b0addc5100
2 changed files with 10 additions and 11 deletions

View File

@ -6,7 +6,7 @@
#include "mc6809.h"
namespace EightBit {
class Disassembly {
class Disassembly final {
public:
Disassembly(mc6809& processor);
@ -16,14 +16,6 @@ namespace EightBit {
std::string dumpState();
static std::string dump_Flags(uint8_t value);
static std::string dump_ByteValue(uint8_t value);
static std::string dump_RelativeValue(int8_t value);
static std::string dump_WordValue(uint16_t value);
static std::string dump_WordValue(register16_t value);
static std::string dump_RelativeValue(int16_t value);
static std::string dump_RelativeValue(register16_t value);
private:
mc6809& m_cpu;
@ -32,6 +24,14 @@ namespace EightBit {
bool m_prefix10 = false;
bool m_prefix11 = false;
static std::string dump_Flags(uint8_t value);
static std::string dump_ByteValue(uint8_t value);
static std::string dump_RelativeValue(int8_t value);
static std::string dump_WordValue(uint16_t value);
static std::string dump_WordValue(register16_t value);
static std::string dump_RelativeValue(int16_t value);
static std::string dump_RelativeValue(register16_t value);
static void dump(std::ostream& out, int value, int width);
mc6809& CPU() { return m_cpu; }

View File

@ -66,7 +66,6 @@ std::string EightBit::Disassembly::dumpState() {
std::ostringstream output;
output << std::hex;
output << "PC=" << dump_WordValue(CPU().PC()) << ":";
output << "CC=" << dump_Flags(CPU().CC()) << ",";
output << "D=" << dump_WordValue(CPU().D()) << ",";
@ -458,7 +457,7 @@ std::string EightBit::Disassembly::disassembleUnprefixed() {
case 0x13: output << "\tSYNC"; break; // SYNC (inherent)
// TFR
case 0x1f: output << tfr("tfr"); break; // TFR (immediate)
case 0x1f: output << tfr("TFR"); break; // TFR (immediate)
// TST
case 0x0d: output << Address_direct("TST"); break; // TST (direct)