From 87f729ce23186d26be3257c8a852f47f4a10bb46 Mon Sep 17 00:00:00 2001 From: AJR Date: Tue, 24 Jul 2018 20:21:49 -0400 Subject: [PATCH] m6809: Disassembly tweaks - Use FCB directive to represent illegal opcodes - Remove unnecessary spaces for instructions without operands --- src/devices/cpu/m6809/6x09dasm.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/devices/cpu/m6809/6x09dasm.cpp b/src/devices/cpu/m6809/6x09dasm.cpp index 393eba18998..9b7721ab268 100644 --- a/src/devices/cpu/m6809/6x09dasm.cpp +++ b/src/devices/cpu/m6809/6x09dasm.cpp @@ -113,7 +113,10 @@ offs_t m6x09_base_disassembler::disassemble(std::ostream &stream, offs_t pc, con const opcodeinfo *op = fetch_opcode(opcodes, p); if (!op) { - stream << "Illegal Opcode"; + // illegal opcode + util::stream_format(stream, "%-6s$%02X", "FCB", opcodes.r8(pc)); + for (offs_t q = pc + 1; q < p; q++) + util::stream_format(stream, ",$%02X", opcodes.r8(q)); return (p - pc) | SUPPORTED; } @@ -126,7 +129,10 @@ offs_t m6x09_base_disassembler::disassemble(std::ostream &stream, offs_t pc, con p += numoperands; // output the base instruction name - util::stream_format(stream, "%-6s", op->name()); + if (op->mode() == INH) + stream << op->name(); + else + util::stream_format(stream, "%-6s", op->name()); switch (op->mode()) {