mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Let RGBASM write JR offsets in floating sections
This requires some special-casing for `jr @` because the `jr` opcode has already been emitted, but not the operand, so PC points to the middle. Moved the RGBLINK test to RGBASM's folder, and created a new RGBLINK test.
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
SECTION "fixed", ROM0[0]
|
||||
jr @
|
||||
; We need this section to be floating because RGBASM can know the value of PC
|
||||
; otherwise, leading to different behavior
|
||||
; FIXME: we rely on this landing at address 2, which isn't *guaranteed*...
|
||||
SECTION "floating", ROM0
|
||||
jr @
|
||||
SECTION "Floating", ROM0
|
||||
; RGBASM knows how to compute `jr @` by itself, but this will evade it
|
||||
jr @ - 1 + 1
|
||||
|
||||
@@ -1 +1 @@
|
||||
<18><18>
|
||||
<18>
|
||||
Reference in New Issue
Block a user