mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 19:22:05 +00:00
Allow LOAD FRAGMENT (#1552)
This was implemented in #736 but removed after discussion in #869. Fixes #1537
This commit is contained in:
8
test/link/load-fragment/section-fragment/a.asm
Normal file
8
test/link/load-fragment/section-fragment/a.asm
Normal file
@@ -0,0 +1,8 @@
|
||||
SECTION FRAGMENT "rom", ROM0
|
||||
Part1::
|
||||
LOAD FRAGMENT "ram", WRAM0
|
||||
wPart1::
|
||||
jr wPart1
|
||||
jr wPart3
|
||||
ENDL
|
||||
Part1End::
|
||||
4
test/link/load-fragment/section-fragment/b.asm
Normal file
4
test/link/load-fragment/section-fragment/b.asm
Normal file
@@ -0,0 +1,4 @@
|
||||
SECTION FRAGMENT "rom", ROM0
|
||||
Part2::
|
||||
db "Hello world!"
|
||||
Part2End::
|
||||
8
test/link/load-fragment/section-fragment/c.asm
Normal file
8
test/link/load-fragment/section-fragment/c.asm
Normal file
@@ -0,0 +1,8 @@
|
||||
SECTION FRAGMENT "rom", ROM0
|
||||
Part3::
|
||||
LOAD FRAGMENT "ram", WRAM0
|
||||
wPart3::
|
||||
jr wPart1
|
||||
jr wPart3
|
||||
ENDL
|
||||
Part3End::
|
||||
BIN
test/link/load-fragment/section-fragment/ref.out.bin
Normal file
BIN
test/link/load-fragment/section-fragment/ref.out.bin
Normal file
Binary file not shown.
24
test/link/load-fragment/section-fragment/ref.out.map
Normal file
24
test/link/load-fragment/section-fragment/ref.out.map
Normal file
@@ -0,0 +1,24 @@
|
||||
SUMMARY:
|
||||
ROM0: 20 bytes used / 16364 free
|
||||
WRAM0: 8 bytes used / 4088 free
|
||||
|
||||
ROM0 bank #0:
|
||||
SECTION: $0000-$0013 ($0014 bytes) ["rom"]
|
||||
$0000 = Part1
|
||||
$0004 = Part1End
|
||||
; Next fragment
|
||||
$0010 = Part3
|
||||
$0014 = Part3End
|
||||
; Next fragment
|
||||
$0004 = Part2
|
||||
$0010 = Part2End
|
||||
EMPTY: $0014-$3fff ($3fec bytes)
|
||||
TOTAL EMPTY: $3fec bytes
|
||||
|
||||
WRAM0 bank #0:
|
||||
SECTION: $c000-$c007 ($0008 bytes) ["ram"]
|
||||
$c000 = wPart1
|
||||
; Next fragment
|
||||
$c004 = wPart3
|
||||
EMPTY: $c008-$cfff ($0ff8 bytes)
|
||||
TOTAL EMPTY: $0ff8 bytes
|
||||
9
test/link/load-fragment/section-fragment/ref.out.sym
Normal file
9
test/link/load-fragment/section-fragment/ref.out.sym
Normal file
@@ -0,0 +1,9 @@
|
||||
; File generated by rgblink
|
||||
00:0000 Part1
|
||||
00:0004 Part1End
|
||||
00:0004 Part2
|
||||
00:0010 Part3
|
||||
00:0010 Part2End
|
||||
00:0014 Part3End
|
||||
00:c000 wPart1
|
||||
00:c004 wPart3
|
||||
Reference in New Issue
Block a user