summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/m6809/6x09dasm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/m6809/6x09dasm.cpp')
-rw-r--r--src/devices/cpu/m6809/6x09dasm.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/devices/cpu/m6809/6x09dasm.cpp b/src/devices/cpu/m6809/6x09dasm.cpp
index bc366a567fe..9b7721ab268 100644
--- a/src/devices/cpu/m6809/6x09dasm.cpp
+++ b/src/devices/cpu/m6809/6x09dasm.cpp
@@ -214,10 +214,6 @@ offs_t m6x09_base_disassembler::disassemble(std::ostream &stream, offs_t pc, con
else if (numoperands == 2)
{
ea = params.r16(ppc);
- if( !(ea & 0xff00) )
- {
- stream << '>'; // need the '>' to force an assembler to use EXT addressing
- }
util::stream_format(stream, "$%04X", ea);
}
break;
@@ -234,7 +230,7 @@ offs_t m6x09_base_disassembler::disassemble(std::ostream &stream, offs_t pc, con
pb = params.r8(ppc);
}
- indexed(stream, pb, params, p);
+ indirect(stream, pb, params, p);
break;
case IMM:
@@ -814,10 +810,10 @@ m6x09_disassembler::m6x09_disassembler(m6x09_instruction_level level, const char
}
//-------------------------------------------------
-// indexed addressing mode for M6809/HD6309
+// indirect addressing mode for M6809/HD6309
//-------------------------------------------------
-void m6x09_disassembler::indexed(std::ostream &stream, uint8_t pb, const data_buffer &params, offs_t &p)
+void m6x09_disassembler::indirect(std::ostream &stream, uint8_t pb, const data_buffer &params, offs_t &p)
{
uint8_t reg = (pb >> 5) & 3;
uint8_t pbm = pb & 0x8f;
@@ -912,14 +908,16 @@ void m6x09_disassembler::indexed(std::ostream &stream, uint8_t pb, const data_bu
break;
case 0x8c: // (+/- 7 bit offset),PC
- offset = (int8_t)params.r8(p++);
- util::stream_format(stream, "$%04X,PCR", (p+offset)); // PC Relative addressing (assembler computes offset from specified absolute address)
+ offset = (int8_t)params.r8(p);
+ util::stream_format(stream, "%s", (offset < 0) ? "-" : "");
+ util::stream_format(stream, "$%02X,PC", (offset < 0) ? -offset : offset);
break;
case 0x8d: // (+/- 15 bit offset),PC
offset = (int16_t)params.r16(p);
p += 2;
- util::stream_format(stream, "$%04X,PCR", (p+offset)); // PC Relative addressing (assembler computes offset from specified absolute address)
+ util::stream_format(stream, "%s", (offset < 0) ? "-" : "");
+ util::stream_format(stream, "$%04X,PC", (offset < 0) ? -offset : offset);
break;
case 0x8e: // (+/- W),R
@@ -1242,10 +1240,10 @@ konami_disassembler::konami_disassembler() : m6x09_base_disassembler(konami_opco
}
//-------------------------------------------------
-// indexed addressing mode for Konami
+// indirect addressing mode for Konami
//-------------------------------------------------
-void konami_disassembler::indexed(std::ostream &stream, uint8_t mode, const data_buffer &params, offs_t &p)
+void konami_disassembler::indirect(std::ostream &stream, uint8_t mode, const data_buffer &params, offs_t &p)
{
static const char index_reg[8][3] =
{