mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-30 14:57:50 +00:00
Implement [[ fragment literals ]] (#1614)
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".
This commit is contained in:
14
test/asm/fragment-literal-in-load.asm
Normal file
14
test/asm/fragment-literal-in-load.asm
Normal file
@@ -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:
|
||||
Reference in New Issue
Block a user