mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-09 01:38:05 +11:00
25 lines
433 B
Bash
Executable File
25 lines
433 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
TMPFILE=$(mktemp)
|
|
SCAS=scas
|
|
ZASM=../emul/zasm
|
|
ASMFILE=../zasm.asm
|
|
|
|
./geninstrs.py $ASMFILE | \
|
|
while read line; do
|
|
echo $line | tee "${TMPFILE}"
|
|
EXPECTED=$($SCAS -o - "${TMPFILE}" | xxd)
|
|
ACTUAL=$(echo $line | $ZASM | xxd)
|
|
if [ "$ACTUAL" == "$EXPECTED" ]; then
|
|
echo ok
|
|
else
|
|
echo actual
|
|
echo $ACTUAL
|
|
echo expected
|
|
echo $EXPECTED
|
|
exit 1
|
|
fi
|
|
done
|