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:
Rangi
2022-09-29 19:59:33 -04:00
committed by GitHub
parent c35cb6ac32
commit dec4133e84
13 changed files with 60 additions and 0 deletions

19
test/asm/section-name.asm Normal file
View 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