Files
rgbds/test/asm/load-pc-bank.asm
T
Rangi 646cb05faf Fix BANK(@) discrepancy within LOAD blocks (#2149)
RGBASM and RGBLINK disagreed on which section to consider `@` to be in;
we have decided that the latter is correct.

The `assume` change is known to be suspicious; for more discussion, see
https://github.com/gbdev/rgbds/pull/2149#discussion_r4106902830
2026-09-25 19:18:52 +02:00

32 lines
623 B
NASM

SECTION "rom", ROMX, BANK[1]
xLabel:
assert @ == xLabel
static_assert BANK(@) == BANK(xLabel)
static_assert SECTION(@) === SECTION(xLabel)
ds $3000, $42
LOAD "ram", WRAMX, BANK[2]
wLabel::
assert @ == wLabel
static_assert BANK(@) == BANK(wLabel)
static_assert SECTION(@) === SECTION(wLabel)
ds $1000, $42
ENDL
SECTION "floating rom", ROMX
xLabel2:
assert @ == xLabel2
assert BANK(@) == BANK(xLabel2)
static_assert SECTION(@) === SECTION(xLabel2)
ds $3000, $42
LOAD "floating ram", WRAMX
wLabel2::
assert @ == wLabel2
assert BANK(@) == BANK(wLabel2)
static_assert SECTION(@) === SECTION(wLabel2)
ds $1000, $42
ENDL