From 0b54013387adceea251a742d48575e86c9f098bb Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 30 Oct 2024 11:46:37 -0400 Subject: m6809: Mask PCR-mode addresses in disassembly --- src/devices/cpu/m6809/6x09dasm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/cpu/m6809/6x09dasm.cpp b/src/devices/cpu/m6809/6x09dasm.cpp index d43e1ce612b..55911016942 100644 --- a/src/devices/cpu/m6809/6x09dasm.cpp +++ b/src/devices/cpu/m6809/6x09dasm.cpp @@ -993,13 +993,13 @@ void m6x09_disassembler::indexed(std::ostream &stream, uint8_t pb, const data_bu 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) + util::stream_format(stream, "$%04X,PCR", (p+offset) & 0xffff); // PC Relative addressing (assembler computes offset from specified absolute address) 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, "$%04X,PCR", (p+offset) & 0xffff); // PC Relative addressing (assembler computes offset from specified absolute address) break; case 0x8e: // (+/- W),R -- cgit v1.2.3