From 023b574fc5a21a259317a065b6f89db9a4855a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ni=C3=B1o=20D=C3=ADaz?= Date: Wed, 26 Apr 2017 00:56:31 +0200 Subject: [PATCH] New warning for rgbasm and fixes in error messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Antonio Niño Díaz --- src/asm/asmy.y | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/asm/asmy.y b/src/asm/asmy.y index 137546e9..f30daaf5 100644 --- a/src/asm/asmy.y +++ b/src/asm/asmy.y @@ -1351,7 +1351,7 @@ z80_ldio : T_Z80_LDIO T_MODE_A comma op_mem_ind if( (!rpn_isReloc(&$4)) && ($4.nVal<0 || ($4.nVal>0xFF && $4.nVal<0xFF00) || $4.nVal>0xFFFF) ) { - yyerror("Source address $%x not in HRAM ($FF00 to $FFFE)", $4.nVal); + yyerror("Source address $%x not in $FF00 to $FFFF", $4.nVal); } out_AbsByte(0xF0); @@ -1365,7 +1365,7 @@ z80_ldio : T_Z80_LDIO T_MODE_A comma op_mem_ind if( (!rpn_isReloc(&$2)) && ($2.nVal<0 || ($2.nVal>0xFF && $2.nVal<0xFF00) || $2.nVal>0xFFFF) ) { - yyerror("Destination address $%x not in HRAM ($FF00 to $FFFE)", $2.nVal); + yyerror("Destination address $%x not in $FF00 to $FFFF", $2.nVal); } out_AbsByte(0xE0); @@ -1385,7 +1385,10 @@ 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); } + { + out_AbsByte(0xF8); out_RelByte(&$6); + warning("'LD HL,[SP+e8]' is obsolete, use 'LD HL,SP+e8' instead."); + } | 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