Merge pull request #430 from ISSOtm/known_selfbank

Make `BANK(@)` and `BANK("section")` known to RGBASM
This commit is contained in:
Eldred Habert
2020-01-08 18:56:28 +01:00
committed by GitHub
8 changed files with 131 additions and 37 deletions

11
test/asm/pc-bank.asm Normal file
View File

@@ -0,0 +1,11 @@
SECTION "Fixed bank", ROMX,BANK[42]
ldh a, [BANK(@) * 256] ; This should be complained about at assembly time
X = BANK(@)
SECTION "Something else", ROMX
Y = BANK("Fixed bank")
PRINTT "@: {X}\nStr: {Y}\n"
ERR = BANK(@)

8
test/asm/pc-bank.out Normal file
View File

@@ -0,0 +1,8 @@
ERROR: pc-bank.asm(2):
Source address $2a00 not in $FF00 to $FFFF
ERROR: pc-bank.asm(11):
@'s bank is not known yet
ERROR: pc-bank.asm(11):
Non-constant expression
@: $2A
Str: $2A