mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-23 00:29:47 +00:00
Correct a couple of minor issues in the 6809 disassembler
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
52ad4e6996
commit
b0addc5100
@ -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; }
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user