From: Lukas Krickl Date: Tue, 12 Dec 2023 13:10:40 +0000 (+0100) Subject: Fixed swap instructions X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=4588586b4084abec04f8d5d3b5bc85f9c8856e94;p=ulas%2F.git Fixed swap instructions --- diff --git a/src/ulas.c b/src/ulas.c index d544753..eb0ab31 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -2037,13 +2037,13 @@ const struct ulas_instr ULASINSTRS[] = { ULAS_INSTR_REG("push", 0xF5, ULAS_REG_AF), // prefixed + ULAS_INSTR_PRER8D("swap", 0x30), ULAS_INSTR_PRER8D("rlc", 0x00), ULAS_INSTR_PRER8D("rrc", 0x08), ULAS_INSTR_PRER8D("rl", 0x10), ULAS_INSTR_PRER8D("rr", 0x18), ULAS_INSTR_PRER8D("sla", 0x10), ULAS_INSTR_PRER8D("sra", 0x18), - ULAS_INSTR_PRER8D("swap", 0x30), ULAS_INSTR_PRER8D("srl", 0x38), ULAS_INSTR_PREBITR8D("bit", 0x40, '0'), diff --git a/tests/t0.bin b/tests/t0.bin index 94bb56d..8c99625 100644 Binary files a/tests/t0.bin and b/tests/t0.bin differ diff --git a/tests/t0.s b/tests/t0.s index d0124db..f30707b 100644 --- a/tests/t0.s +++ b/tests/t0.s @@ -109,3 +109,5 @@ l3: .db 1 ; local label forward declaration call @fl0 @fl0: + swap a + ld [1], a