mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-17 10:38:05 +11:00
aa8df95f7d
Also, add a "real world" example in AVRA tests, a blink program on a ATtiny45. Some instructions are commented out because they aren't implemented yet, but not many. The output of the program has been verified against AVRA's own output.
30 lines
465 B
Bash
Executable File
30 lines
465 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
ZASM=../../zasm.sh
|
|
AVRINC=../../../avr
|
|
|
|
cmpas() {
|
|
FN=$1
|
|
EXPECTED=$(xxd ${FN%.*}.expected)
|
|
ACTUAL=$(cat ${FN} | "${ZASM}" -a "${AVRINC}" | xxd)
|
|
if [ "$ACTUAL" = "$EXPECTED" ]; then
|
|
echo ok
|
|
else
|
|
echo actual
|
|
echo "$ACTUAL"
|
|
echo expected
|
|
echo "$EXPECTED"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
if [ ! -z $1 ]; then
|
|
cmpas $1
|
|
exit 0
|
|
fi
|
|
|
|
for fn in *.asm; do
|
|
echo "Comparing ${fn}"
|
|
cmpas $fn
|
|
done
|