From 46bb3da86520adef88ac2219bfb2eea30267cc61 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Mon, 11 Dec 2023 18:00:17 +0100 Subject: [PATCH] Added missing ld [hl], a instruction --- src/ulas.c | 3 ++- tests/t0.bin | Bin 153 -> 154 bytes tests/t0.s | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ulas.c b/src/ulas.c index 23921f4..66e271a 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -1882,11 +1882,12 @@ const struct ulas_instr ULASINSTRS[] = { ULAS_INSTR_R8R8D("ld", 0x78, ULAS_REG_A), // ld [r16], a - {"ld", {'[', ULAS_REG_HL, ']', ',', ULAS_E8, 0}, {0x36, ULAS_E8, 0x00}}, {"ld", {'[', ULAS_REG_BC, ']', ',', ULAS_REG_A, 0}, {0x02, 0}}, {"ld", {'[', ULAS_REG_DE, ']', ',', ULAS_REG_A, 0}, {0x12, 0}}, + {"ld", {'[', ULAS_REG_HL, ']', ',', ULAS_REG_A, 0}, {0x77, 0}}, {"ld", {'[', ULAS_REG_HL, '+', ']', ',', ULAS_REG_A, 0}, {0x22, 0}}, {"ld", {'[', ULAS_REG_HL, '-', ']', ',', ULAS_REG_A, 0}, {0x32, 0}}, + {"ld", {'[', ULAS_REG_HL, ']', ',', ULAS_E8, 0}, {0x36, ULAS_E8, 0x00}}, // ld a, [r16] {"ld", {ULAS_REG_A, ',', '[', ULAS_REG_BC, ']', 0}, {0x0A, 0}}, diff --git a/tests/t0.bin b/tests/t0.bin index c4ede5e0c800a5f9d83336d81069f0021d254441..6bf94696b3478dd994192e42f8e77c6226e625e2 100644 GIT binary patch delta 8 PcmbQqIE!(@OvZ8m4EzGu delta 6 NcmbQmIFoV0OaKSR0$%_C diff --git a/tests/t0.s b/tests/t0.s index 5e75e99..52676ce 100644 --- a/tests/t0.s +++ b/tests/t0.s @@ -101,3 +101,5 @@ l2: j1: jp j1 .chksm + + ld [hl], a -- 2.30.2