From b40c567aeecca9708fca3c6baa91a1848835bb52 Mon Sep 17 00:00:00 2001 From: Ben10do Date: Thu, 26 Jan 2017 16:55:00 +0000 Subject: [PATCH] Add ldi a, [hl] and ldd a, [hl] instructions These are equivalent to ld a, [hl+] and ld a, [hl-] respectively. --- src/asm/asmy.y | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/asm/asmy.y b/src/asm/asmy.y index 29dd9f01..a8b96f50 100644 --- a/src/asm/asmy.y +++ b/src/asm/asmy.y @@ -1263,12 +1263,16 @@ z80_ldi : T_Z80_LDI T_MODE_HL_IND comma T_MODE_A { out_AbsByte(0x02|(2<<4)); } | T_Z80_LDI T_MODE_A comma T_MODE_HL { out_AbsByte(0x0A|(2<<4)); } + | T_Z80_LDI T_MODE_A comma T_MODE_HL_IND + { out_AbsByte(0x0A|(2<<4)); } ; z80_ldd : T_Z80_LDD T_MODE_HL_IND comma T_MODE_A { out_AbsByte(0x02|(3<<4)); } | T_Z80_LDD T_MODE_A comma T_MODE_HL { out_AbsByte(0x0A|(3<<4)); } + | T_Z80_LDD T_MODE_A comma T_MODE_HL_IND + { out_AbsByte(0x0A|(3<<4)); } ; z80_ldio : T_Z80_LDIO T_MODE_A comma op_mem_ind