mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-30 23:28:06 +11:00
097c677641
This allows us to get rid of the zasm.sh wrapper.
30 lines
466 B
Bash
Executable File
30 lines
466 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
ZASM=../../emul/zasm/avra
|
|
AVRINC=../../avr
|
|
|
|
cmpas() {
|
|
FN=$1
|
|
EXPECTED=$(xxd ${FN%.*}.expected)
|
|
ACTUAL=$(cat ${FN} | "${ZASM}" "${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
|