Report any section overflows at the end of assembly (#1482)

* Report any section overflows at the end of assembly

* Immediately handle overflow of the 32-bit size counter
This commit is contained in:
Sylvie
2024-08-22 12:51:52 -04:00
committed by GitHub
parent 7bc9a24bf0
commit 0e8a17ce82
9 changed files with 94 additions and 119 deletions

View File

@@ -1,25 +1,25 @@
SECTION "Overflow", ROM0
ds $6000
LOAD "oops",WRAM0
; We might get an error for "oops", but it can also make sense to no-op the directive
ds $2001
; We shouldn't get any more errors for "Overflow" nor "oops"
ds $2000
db
db
ENDL
SECTION "Moar overflow", ROM0
ds $6001
ds $4000
ds $4000
LOAD "hmm", WRAM0
ds $2000
; Since the `ds` overflows "Moar overflow", it could be no-op'd, making this `db` not error
db
ds $2000
ENDL
ds $1000
SECTION "Not overflowing", ROM0
ds $5FFF
ds $800
LOAD "lol", WRAM0
ds $2000
db
; Since the LOAD block is overflowed, this may be no-op'd, not affecting the "parent"
ds $1000
ds $1000
ds $1000
ENDL
dw ; This, however...
ds $800