Added missing ld [hl], a instruction
authorLukas Krickl <lukas@krickl.dev>
Mon, 11 Dec 2023 17:00:17 +0000 (18:00 +0100)
committerLukas Krickl <lukas@krickl.dev>
Mon, 11 Dec 2023 17:00:17 +0000 (18:00 +0100)
src/ulas.c
tests/t0.bin
tests/t0.s

index 23921f47b8a201d6634aa91871866775f755ee0c..66e271aff3f31e7e979221c3ec55412176e8a414 100644 (file)
@@ -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}},
index c4ede5e0c800a5f9d83336d81069f0021d254441..6bf94696b3478dd994192e42f8e77c6226e625e2 100644 (file)
Binary files a/tests/t0.bin and b/tests/t0.bin differ
index 5e75e9932bf8c3aa5cbec29014cc9fad2ae5f0d9..52676cee92000a05fd6d35f17e735c930528a989 100644 (file)
@@ -101,3 +101,5 @@ l2:
 j1:
   jp j1
 .chksm
+
+  ld [hl], a