mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Implement SIZEOF("Section") and STARTOF("Section") (#766)
Updates the object file revision to 8 Fixes #765
This commit is contained in:
8
test/asm/section-sizeof-startof.asm
Normal file
8
test/asm/section-sizeof-startof.asm
Normal file
@@ -0,0 +1,8 @@
|
||||
SECTION "sect", ROMX[$4567], BANK[$23]
|
||||
ds 42
|
||||
|
||||
W = BANK("sect")
|
||||
X = SIZEOF("sect")
|
||||
Y = STARTOF("sect")
|
||||
|
||||
println "{W} {X} {Y}"
|
||||
5
test/asm/section-sizeof-startof.err
Normal file
5
test/asm/section-sizeof-startof.err
Normal file
@@ -0,0 +1,5 @@
|
||||
ERROR: section-sizeof-startof.asm(5):
|
||||
Expected constant expression: Section "sect"'s size is not known
|
||||
ERROR: section-sizeof-startof.asm(6):
|
||||
Expected constant expression: Section "sect"'s start is not known
|
||||
error: Assembly aborted (2 errors)!
|
||||
1
test/asm/section-sizeof-startof.out
Normal file
1
test/asm/section-sizeof-startof.out
Normal file
@@ -0,0 +1 @@
|
||||
$23 $0 $0
|
||||
7
test/link/sizeof-startof.asm
Normal file
7
test/link/sizeof-startof.asm
Normal file
@@ -0,0 +1,7 @@
|
||||
SECTION "meta", ROM0[0]
|
||||
db BANK("sect")
|
||||
dw STARTOF("sect")
|
||||
dw SIZEOF("sect")
|
||||
|
||||
SECTION "sect", ROMX[$4567], BANK[$23]
|
||||
ds 42
|
||||
BIN
test/link/sizeof-startof.out.bin
Normal file
BIN
test/link/sizeof-startof.out.bin
Normal file
Binary file not shown.
Reference in New Issue
Block a user