From 9226f63eda9b47b5ee0b1dad9d4f101a082a9c7b Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Sun, 27 Mar 2022 12:51:47 +0200 Subject: [PATCH] JSR disassembly --- cpu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu.cpp b/cpu.cpp index ec9599f..cdda29d 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -1591,9 +1591,9 @@ void cpu::disassemble() } if ((instruction & 0b1111111000000000) == 0b0000100000000000) { - auto dst_text = addressing_to_string(src_register, (pc + 2) & 65535); + auto dst_text = addressing_to_string(dst_register, (pc + 2) & 65535); - text = std::string("JSR ") + dst_text.first; + text = format("JSR R%d,", src_register & 7) + dst_text.first; } if ((instruction & 0b1111111111111000) == 0b0000000010000000)