mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-23 00:29:47 +00:00
Only show disassembled output, when there is actually something to show (fixes 6809 startup/interrupt sequence)
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
983e2a5eb2
commit
974d5fbd14
@ -32,19 +32,21 @@ void Board::Cpu_ExecutingInstruction_Debug(EightBit::mc6809& cpu) {
|
||||
auto address = cpu.PC().word;
|
||||
auto cell = peek(address);
|
||||
|
||||
std::cout << std::hex;
|
||||
std::cout << "PC=" << EightBit::Disassembly::dump_WordValue(address) << ":";
|
||||
std::cout << "CC=" << EightBit::Disassembly::dump_Flags(CPU().CC()) << ",";
|
||||
std::cout << "D=" << EightBit::Disassembly::dump_WordValue(CPU().D().word) << ",";
|
||||
std::cout << "X=" << EightBit::Disassembly::dump_WordValue(CPU().X().word) << ",";
|
||||
std::cout << "Y=" << EightBit::Disassembly::dump_WordValue(CPU().Y().word) << ",";
|
||||
std::cout << "U=" << EightBit::Disassembly::dump_WordValue(CPU().U().word) << ",";
|
||||
std::cout << "S=" << EightBit::Disassembly::dump_WordValue(CPU().S().word) << ",";
|
||||
std::cout << "DP=" << EightBit::Disassembly::dump_ByteValue(CPU().DP()) << "\t";
|
||||
const auto disassembled = m_disassembler.disassemble(address);
|
||||
if (!disassembled.empty()) {
|
||||
|
||||
std::cout << m_disassembler.disassemble(address);
|
||||
std::cout << std::hex;
|
||||
std::cout << "PC=" << EightBit::Disassembly::dump_WordValue(address) << ":";
|
||||
std::cout << "CC=" << EightBit::Disassembly::dump_Flags(CPU().CC()) << ",";
|
||||
std::cout << "D=" << EightBit::Disassembly::dump_WordValue(CPU().D().word) << ",";
|
||||
std::cout << "X=" << EightBit::Disassembly::dump_WordValue(CPU().X().word) << ",";
|
||||
std::cout << "Y=" << EightBit::Disassembly::dump_WordValue(CPU().Y().word) << ",";
|
||||
std::cout << "U=" << EightBit::Disassembly::dump_WordValue(CPU().U().word) << ",";
|
||||
std::cout << "S=" << EightBit::Disassembly::dump_WordValue(CPU().S().word) << ",";
|
||||
std::cout << "DP=" << EightBit::Disassembly::dump_ByteValue(CPU().DP()) << "\t";
|
||||
|
||||
std::cout << "\n";
|
||||
std::cout << disassembled << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t& Board::reference(uint16_t address) {
|
||||
|
Loading…
Reference in New Issue
Block a user