From 2ff286223b49b130983994e5e76a5dcd1ad6344e Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 14 Jan 2014 11:39:57 -0500 Subject: [PATCH] add instruction "ld hl, sp+nn" The previous "ld hl, [sp+nn]" is incorrect, but remains for compatibility. --- src/asm/gameboy/yaccprt4.y | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/asm/gameboy/yaccprt4.y b/src/asm/gameboy/yaccprt4.y index 9b8bfcba..bc113e70 100644 --- a/src/asm/gameboy/yaccprt4.y +++ b/src/asm/gameboy/yaccprt4.y @@ -290,6 +290,8 @@ z80_ld : z80_ld_mem z80_ld_hl : T_Z80_LD T_MODE_HL comma '[' T_MODE_SP const_8bit ']' { out_AbsByte(0xF8); out_RelByte(&$6); } + | T_Z80_LD T_MODE_HL comma T_MODE_SP const_8bit + { out_AbsByte(0xF8); out_RelByte(&$5); } | T_Z80_LD T_MODE_HL comma const_16bit { out_AbsByte(0x01|(REG_HL<<4)); out_RelWord(&$4); } ;