mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-06 04:05:38 +00:00
Allow STARTOF(SECTTYPE) and SIZEOF(SECTTYPE) to be constant when possible (#2131)
This commit is contained in:
1 parent
548a11c3ef
commit
e0ee6c9013
6 files changed
+45
-6
No files matched your search
+11
-2
@@ -772,7 +772,15 @@ and no longer the current section).
|
||||
If
|
||||
.Ar arg
|
||||
is a section type keyword, it returns the size of that section type.
|
||||
The result is not constant, since only RGBLINK can compute its value.
|
||||
The result is a known constant except for
|
||||
.Ic ROM0
|
||||
and
|
||||
.Ic WRAM0 ,
|
||||
since their sizes may be affected by RGBLINK options
|
||||
.Fl t
|
||||
and
|
||||
.Fl w
|
||||
respectively.
|
||||
.Pp
|
||||
If
|
||||
.Ar arg
|
||||
@@ -786,7 +794,8 @@ The result is a known constant if the section has a fixed address.
|
||||
If
|
||||
.Ar arg
|
||||
is a section type keyword, it returns the starting address of that section type.
|
||||
The result is not constant, since only RGBLINK can compute its value.
|
||||
.Pp
|
||||
The result is always a known constant at assembly time.
|
||||
.El
|
||||
.Sh SECTIONS
|
||||
Before you can start writing code, you must define a section.
|
||||
|
||||
Reference in new issue
Block a user