forked from gbdev/rgbds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
93 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
FATAL: endsection-in-load.asm(3): | ||
Cannot end the section within a `LOAD` block | ||
error: endsection-in-load.asm(4): | ||
Found `ENDL` outside of a `LOAD` block | ||
error: Assembly aborted (1 error)! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
MACRO data | ||
db SECTION(@), \# | ||
ENDM | ||
|
||
MACRO now_in | ||
if strcmp("\1", "nothing") | ||
assert !strcmp(SECTION(@), \1) | ||
else | ||
assert !def(@) | ||
endc | ||
ENDM | ||
|
||
now_in nothing | ||
|
||
SECTION "A", ROM0 | ||
now_in "A" | ||
data 1 | ||
LOAD "P", WRAM0 | ||
now_in "P" | ||
data 2 | ||
|
||
; LOAD after LOAD | ||
LOAD "Q", WRAM0 | ||
now_in "Q" | ||
data 3 | ||
|
||
; SECTION after LOAD | ||
SECTION "B", ROM0 | ||
now_in "B" | ||
data 4 | ||
LOAD "R", WRAM0 | ||
now_in "R" | ||
data 5 | ||
|
||
; PUSHS after LOAD | ||
PUSHS | ||
SECTION "C", ROM0 | ||
now_in "C" | ||
data 6 | ||
LOAD "S", WRAM0 | ||
now_in "S" | ||
data 7 | ||
|
||
; POPS after LOAD | ||
POPS | ||
now_in "R" | ||
data 8 | ||
|
||
; ENDSECTION after LOAD | ||
ENDSECTION | ||
now_in nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
BRRAPQCS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
SECTION "outer", ROM0 | ||
LOAD "inner", WRAM0 | ||
LOAD "matryoshka", HRAM | ||
ENDL | ||
ENDL | ||
LOAD "inner1", WRAM0 ; starts "inner1" | ||
LOAD "inner2", HRAM ; ends "inner1", starts "inner2" | ||
ENDL ; ends "inner2" | ||
ENDL ; error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
error: load-in-load.asm(3): | ||
`LOAD` blocks cannot be nested | ||
error: load-in-load.asm(5): | ||
Found `ENDL` outside of a `LOAD` block | ||
error: Assembly aborted (2 errors)! | ||
error: Assembly aborted (1 error)! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
SECTION "outer", ROM0 | ||
SECTION "outer1", ROM0 | ||
LOAD "ram", WRAM0 | ||
SECTION "inner", ROM0 | ||
SECTION "outer2", ROM0 | ||
ENDL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
FATAL: section-in-load.asm(3): | ||
Cannot change the section within a `LOAD` block | ||
error: section-in-load.asm(4): | ||
Found `ENDL` outside of a `LOAD` block | ||
error: Assembly aborted (1 error)! |