Deprecate LD with [C] (#1574)

This commit is contained in:
Sylvie
2024-12-10 21:13:09 -05:00
committed by GitHub
parent b18cfe6bdb
commit f44de0c7ae
7 changed files with 29 additions and 12 deletions

View File

@@ -1,3 +1,7 @@
warning: deprecated-ldio.asm(8): [-Wobsolete]
LD [C], A is deprecated; use LDH [C], A
warning: deprecated-ldio.asm(9): [-Wobsolete]
LD A, [C] is deprecated; use LDH A, [C]
warning: deprecated-ldio.asm(13): [-Wobsolete]
LDIO is deprecated; use LDH
warning: deprecated-ldio.asm(14): [-Wobsolete]
@@ -6,6 +10,10 @@ warning: deprecated-ldio.asm(15): [-Wobsolete]
LDIO is deprecated; use LDH
warning: deprecated-ldio.asm(16): [-Wobsolete]
LDIO is deprecated; use LDH
warning: deprecated-ldio.asm(23): [-Wobsolete]
LD [C], A is deprecated; use LDH [C], A
warning: deprecated-ldio.asm(24): [-Wobsolete]
LD A, [C] is deprecated; use LDH A, [C]
warning: deprecated-ldio.asm(28): [-Wobsolete]
LDIO is deprecated; use LDH
warning: deprecated-ldio.asm(29): [-Wobsolete]

View File

@@ -1,9 +1,9 @@
SECTION "ff00+c or not to ff00+c", ROMX
ld a, [$ff00 + c]
ld [65280 + c], a
ldh a, [$ff00 + c]
ldh [65280 + c], a
; Not ok
ld a, [$ff01 + c]
ld [xyz + c], a
ldh a, [$ff01 + c]
ldh [xyz + c], a

View File

@@ -1,5 +1,5 @@
SECTION "test", ROM0[0]
ld [ $ff00 + c ], a
ldh [ $ff00 + c ], a
; 257 spaces exceeds both LEXER_BUF_SIZE (42) and uint8_t limit (255)
ld [ $ff00 + c ], a
ld [ $ff00 + c ], a
ldh [ $ff00 + c ], a
ldh [ $ff00 + c ], a

View File

@@ -1,6 +1,6 @@
SECTION "invalid", ROM0[$10000]
ld [hl], [hl]
ld a, [$00ff+c]
ldh a, [$00ff+c]
ld b, [c]
ld b, [bc]
ld b, [$4000]