From 3e7b0c6fa96d0b7e7b175674ec6018c3955457aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Corr=C3=AAa=20da=20Silva=20Sanches?= Date: Mon, 30 Nov 2015 15:08:24 -0200 Subject: [PATCH] [patinho] Implement PLAX instruction (jump to indexed address) --- src/devices/cpu/patinhofeio/patinho_feio.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/devices/cpu/patinhofeio/patinho_feio.cpp b/src/devices/cpu/patinhofeio/patinho_feio.cpp index 860f01d2187..ba7f5fd4222 100644 --- a/src/devices/cpu/patinhofeio/patinho_feio.cpp +++ b/src/devices/cpu/patinhofeio/patinho_feio.cpp @@ -359,6 +359,13 @@ void patinho_feio_cpu_device::execute_instruction() INCREMENT_PC_4K; PC = addr; return; + case 0x10: + //PLAX = "Pula indexado": Jump to indexed address + value = (opcode & 0x0F) << 8 | READ_BYTE_PATINHO(PC); + INCREMENT_PC_4K; + m_idx = READ_INDEX_REG(); + PC = compute_effective_address(m_idx + value); + return; case 0x20: //ARM = "Armazena": Store the value of the accumulator into a given memory position addr = compute_effective_address((opcode & 0x0F) << 8 | READ_BYTE_PATINHO(PC));