diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2018-07-24 20:21:49 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2018-07-24 20:21:51 -0400 |
commit | 87f729ce23186d26be3257c8a852f47f4a10bb46 (patch) | |
tree | 797de54e48cc35be44bff7cefe351cf791db7fd0 | |
parent | 6e0055ccd7c8a525f3841599b8c6310e5bd2fbc5 (diff) |
m6809: Disassembly tweaks
- Use FCB directive to represent illegal opcodes
- Remove unnecessary spaces for instructions without operands
-rw-r--r-- | src/devices/cpu/m6809/6x09dasm.cpp | 10 |
1 files 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()) { |