Require a plus sign in ld hl, sp + <e8>

Fixes #810
This commit is contained in:
Rangi
2021-03-30 13:05:21 -04:00
parent be877134e5
commit aaa92659ea

View File

@@ -1802,9 +1802,9 @@ z80_ld : z80_ld_mem
| z80_ld_a | z80_ld_a
; ;
z80_ld_hl : T_Z80_LD T_MODE_HL T_COMMA T_MODE_SP reloc_8bit { z80_ld_hl : T_Z80_LD T_MODE_HL T_COMMA T_MODE_SP T_OP_ADD reloc_8bit {
out_AbsByte(0xF8); out_AbsByte(0xF8);
out_RelByte(&$5, 1); out_RelByte(&$6, 1);
} }
| T_Z80_LD T_MODE_HL T_COMMA reloc_16bit { | T_Z80_LD T_MODE_HL T_COMMA reloc_16bit {
out_AbsByte(0x01 | (REG_HL << 4)); out_AbsByte(0x01 | (REG_HL << 4));