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.
This feature is referred to as "code/data literals" in ASMotor, and simply as "literals" in some older assemblers like MIDAS for the PDP-10. RGBASM already had the "section fragments" feature for keeping disparate contents together when linked, so these worked naturally as "fragment literals".
- Loading branch information
Showing
16 changed files
with
201 additions
and
13 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
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
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,15 +1,15 @@ | ||
error: code-after-endm-endr-endc.asm(6): | ||
syntax error, unexpected PRINTLN, expecting end of line or end of buffer | ||
syntax error, unexpected PRINTLN, expecting end of line or end of buffer or end of fragment literal | ||
error: code-after-endm-endr-endc.asm(7): | ||
Macro "mac" not defined | ||
error: code-after-endm-endr-endc.asm(12): | ||
syntax error, unexpected PRINTLN, expecting end of line or end of buffer | ||
syntax error, unexpected PRINTLN, expecting end of line or end of buffer or end of fragment literal | ||
error: code-after-endm-endr-endc.asm(17): | ||
syntax error, unexpected PRINTLN, expecting end of line | ||
error: code-after-endm-endr-endc.asm(19): | ||
syntax error, unexpected PRINTLN, expecting end of line or end of buffer | ||
syntax error, unexpected PRINTLN, expecting end of line or end of buffer or end of fragment literal | ||
error: code-after-endm-endr-endc.asm(23): | ||
syntax error, unexpected PRINTLN, expecting end of line | ||
error: code-after-endm-endr-endc.asm(25): | ||
syntax error, unexpected PRINTLN, expecting end of line or end of buffer | ||
syntax error, unexpected PRINTLN, expecting end of line or end of buffer or end of fragment literal | ||
error: Assembly aborted (7 errors)! |
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,14 @@ | ||
SECTION "OAMDMACode", ROM0 | ||
OAMDMACode: | ||
LOAD "hOAMDMA", HRAM | ||
hOAMDMA:: | ||
ldh [$ff46], a | ||
ld a, 40 | ||
jp [[ | ||
: dec a | ||
jr nz, :- | ||
ret | ||
]] | ||
.end | ||
ENDL | ||
OAMDMACodeEnd: |
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,2 @@ | ||
FATAL: fragment-literal-in-load.asm(7): | ||
`LOAD` blocks cannot contain fragment literals |
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,9 @@ | ||
SECTION "RAM", WRAM0 | ||
|
||
wFoo:: db | ||
wBar:: ds 3 | ||
println "ok" | ||
wQux:: dw [[ | ||
ds 4 | ||
println "inline" | ||
]] |
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,2 @@ | ||
FATAL: fragment-literal-in-ram.asm(6): | ||
Section 'RAM' cannot contain fragment literals (not ROM0 or ROMX) |
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 @@ | ||
ok |
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,5 @@ | ||
SECTION UNION "U", ROM0 | ||
db $11 | ||
dw [[ db $22 ]] | ||
SECTION UNION "U", ROM0 | ||
db $33 |
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,2 @@ | ||
FATAL: fragment-literal-in-union.asm(3): | ||
`SECTION UNION` cannot contain fragment literals |
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