mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 19:22:05 +00:00
SECTION(symbol) returns the name of a symbol's section (#1066)
Fixes #963 Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
This commit is contained in:
19
test/asm/section-name.asm
Normal file
19
test/asm/section-name.asm
Normal file
@@ -0,0 +1,19 @@
|
||||
SECTION "aaa", ROM0[5]
|
||||
println SECTION(@)
|
||||
Label1: println SECTION(Label1)
|
||||
dw STARTOF(SECTION(@))
|
||||
|
||||
SECTION UNION "bbb", WRAM0
|
||||
println SECTION(@)
|
||||
Label2:
|
||||
.local1: println SECTION(Label2.local1)
|
||||
.local2: println SECTION(.local2)
|
||||
|
||||
SECTION FRAGMENT "ccc", HRAM
|
||||
println SECTION(@)
|
||||
: println SECTION(:-)
|
||||
|
||||
PUSHS
|
||||
SECTION "ddd", ROMX
|
||||
println SECTION(@)
|
||||
POPS
|
||||
Reference in New Issue
Block a user