From bcca85fd4c9e4ff5cffc4d465d45044652e94c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Wed, 13 Aug 2025 16:57:37 +0200 Subject: [PATCH] Keep PC unchanged after forced instruction --- app/src/main/java/org/soundpaint/rp2040pio/SM.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/soundpaint/rp2040pio/SM.java b/app/src/main/java/org/soundpaint/rp2040pio/SM.java index 46dd9fd..c9c6361 100644 --- a/app/src/main/java/org/soundpaint/rp2040pio/SM.java +++ b/app/src/main/java/org/soundpaint/rp2040pio/SM.java @@ -1122,7 +1122,7 @@ private void executeInstruction() "before decode"); } status.resultState = instruction.execute(this); - if (status.resultState == Instruction.ResultState.COMPLETE) { + if (status.resultState == Instruction.ResultState.COMPLETE && !status.isForcedInstruction) { /* * Sect. 3.4.2.2.: "Delay cycles … take place after … the program * counter is updated" (though this specifically refers to JMP