mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-29 22:37:50 +00:00
Add section fragments
Fixes #517, and hopefully enables RGBDS as a SDCC back-end
This commit is contained in:
7
test/link/section-union/fragments/a.asm
Normal file
7
test/link/section-union/fragments/a.asm
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
SECTION FRAGMENT "output", ROM0
|
||||
X:
|
||||
db X
|
||||
db 1
|
||||
|
||||
assert WARN, X == 0
|
||||
7
test/link/section-union/fragments/b.asm
Normal file
7
test/link/section-union/fragments/b.asm
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
SECTION FRAGMENT "output", ROM0
|
||||
Y:
|
||||
db Y
|
||||
db 3
|
||||
|
||||
assert WARN, Y == 2
|
||||
BIN
test/link/section-union/fragments/ref.out.bin
Normal file
BIN
test/link/section-union/fragments/ref.out.bin
Normal file
Binary file not shown.
@@ -92,6 +92,12 @@ $RGBLINK -o $gbtemp -l section-union/good/script.link $otemp $gbtemp2
|
||||
dd if=$gbtemp count=1 bs=$(printf %s $(wc -c < section-union/good/ref.out.bin)) > $otemp 2>/dev/null
|
||||
i="section-union/good.asm" tryCmp section-union/good/ref.out.bin $otemp
|
||||
rc=$(($? || $rc))
|
||||
$RGBASM -o $otemp section-union/fragments/a.asm
|
||||
$RGBASM -o $gbtemp2 section-union/fragments/b.asm
|
||||
$RGBLINK -o $gbtemp $otemp $gbtemp2
|
||||
dd if=$gbtemp count=1 bs=$(printf %s $(wc -c < section-union/fragments/ref.out.bin)) > $otemp 2>/dev/null
|
||||
i="section-union/fragments.asm" tryCmp section-union/fragments/ref.out.bin $otemp
|
||||
rc=$(($? || $rc))
|
||||
for i in section-union/*.asm; do
|
||||
$RGBASM -o $otemp $i
|
||||
$RGBASM -o $gbtemp2 $i -DSECOND
|
||||
|
||||
Reference in New Issue
Block a user