From ab63801242f96e2fbdf7ec75b26bc7b32e1170c5 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Tue, 19 Feb 2013 18:20:39 -0500 Subject: [PATCH] fix bug with RTD instruction (wasn't actually returning) --- cpu/CpuModule_Instructions.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpu/CpuModule_Instructions.c b/cpu/CpuModule_Instructions.c index 94f7e7c..2d4101b 100644 --- a/cpu/CpuModule_Instructions.c +++ b/cpu/CpuModule_Instructions.c @@ -1909,6 +1909,9 @@ static void cpuReset() static void cpuRtd() { ULO displacement = cpuGetNextWordSignExt(); + + cpuInitializeFromNewPC(memoryReadLong(cpuGetAReg(7))); + cpuSetAReg(7, cpuGetAReg(7) + 4 + displacement); cpuSetInstructionTime(4); }