mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Declare some opcodes obsolete
They are still working, they just output a warning. `jp [hl]` is confusing as it may be thought that the CPU reads the value pointed by hl and jumps to it. `ldi a,hl` and `ldd a,hl` are also confusing as they load from the address pointed by `hl`, the correct mnemonic should say `[hl]`. Signed-off-by: AntonioND <antonio_nd@outlook.com>
This commit is contained in:
@@ -1279,7 +1279,11 @@ z80_jp : T_Z80_JP const_16bit
|
|||||||
| T_Z80_JP ccode comma const_16bit
|
| T_Z80_JP ccode comma const_16bit
|
||||||
{ out_AbsByte(0xC2|($2<<3)); out_RelWord(&$4); }
|
{ out_AbsByte(0xC2|($2<<3)); out_RelWord(&$4); }
|
||||||
| T_Z80_JP T_MODE_HL_IND
|
| T_Z80_JP T_MODE_HL_IND
|
||||||
{ out_AbsByte(0xE9); }
|
{
|
||||||
|
out_AbsByte(0xE9);
|
||||||
|
if( nPass==1 )
|
||||||
|
printf("warning:'JP [HL]' is obsolete, use 'JP HL' instead.\n");
|
||||||
|
}
|
||||||
| T_Z80_JP T_MODE_HL
|
| T_Z80_JP T_MODE_HL
|
||||||
{ out_AbsByte(0xE9); }
|
{ out_AbsByte(0xE9); }
|
||||||
;
|
;
|
||||||
@@ -1293,7 +1297,11 @@ z80_jr : T_Z80_JR const_PCrel
|
|||||||
z80_ldi : T_Z80_LDI T_MODE_HL_IND comma T_MODE_A
|
z80_ldi : T_Z80_LDI T_MODE_HL_IND comma T_MODE_A
|
||||||
{ out_AbsByte(0x02|(2<<4)); }
|
{ out_AbsByte(0x02|(2<<4)); }
|
||||||
| T_Z80_LDI T_MODE_A comma T_MODE_HL
|
| T_Z80_LDI T_MODE_A comma T_MODE_HL
|
||||||
{ out_AbsByte(0x0A|(2<<4)); }
|
{
|
||||||
|
out_AbsByte(0x0A|(2<<4));
|
||||||
|
if( nPass==1 )
|
||||||
|
printf("warning:'LDI A,HL' is obsolete, use 'LDI A,[HL]' or 'LD A,[HL+] instead.\n");
|
||||||
|
}
|
||||||
| T_Z80_LDI T_MODE_A comma T_MODE_HL_IND
|
| T_Z80_LDI T_MODE_A comma T_MODE_HL_IND
|
||||||
{ out_AbsByte(0x0A|(2<<4)); }
|
{ out_AbsByte(0x0A|(2<<4)); }
|
||||||
;
|
;
|
||||||
@@ -1301,7 +1309,11 @@ z80_ldi : T_Z80_LDI T_MODE_HL_IND comma T_MODE_A
|
|||||||
z80_ldd : T_Z80_LDD T_MODE_HL_IND comma T_MODE_A
|
z80_ldd : T_Z80_LDD T_MODE_HL_IND comma T_MODE_A
|
||||||
{ out_AbsByte(0x02|(3<<4)); }
|
{ out_AbsByte(0x02|(3<<4)); }
|
||||||
| T_Z80_LDD T_MODE_A comma T_MODE_HL
|
| T_Z80_LDD T_MODE_A comma T_MODE_HL
|
||||||
{ out_AbsByte(0x0A|(3<<4)); }
|
{
|
||||||
|
out_AbsByte(0x0A|(3<<4));
|
||||||
|
if( nPass==1 )
|
||||||
|
printf("warning:'LDD A,HL' is obsolete, use 'LDD A,[HL]' or 'LD A,[HL-] instead.\n");
|
||||||
|
}
|
||||||
| T_Z80_LDD T_MODE_A comma T_MODE_HL_IND
|
| T_Z80_LDD T_MODE_A comma T_MODE_HL_IND
|
||||||
{ out_AbsByte(0x0A|(3<<4)); }
|
{ out_AbsByte(0x0A|(3<<4)); }
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user