Files
rgbds/test/asm/test.sh
mid-kid c63af05427 Allow linker script to consider section attributes
The linker script now allows you to assign a section with the same
attributes as in the source.
To do this, I've removed a check from AssignSectionAddressAndBankByName
that would never be triggered, due to that condition being checked
before. Shouldn't this and IsSectionSameTypeBankAndAttrs be condensed
into a single function?
2019-01-18 12:37:23 +01:00

25 lines
479 B
Bash
Executable File

#!/bin/sh
o=$(mktemp)
gb=$(mktemp)
before=$(mktemp)
after=$(mktemp)
rc=0
for i in *.asm; do
../../rgbasm -o $o $i > $after 2>&1
diff -u ${i%.asm}.out $after
rc=$(($? || $rc))
bin=${i%.asm}.out.bin
if [ -f $bin ]; then
../../rgblink -o $gb $o > $after 2>&1
head -c $(wc -c < $bin) $gb > $after 2>&1
hexdump -C $after > $before && mv $before $after
hexdump -C $bin > $before
diff -u $before $after
rc=$(($? || $rc))
fi
done
rm -f $o $gb $before $after
exit $rc