AssemAll
834 Bytes
#!/bin/sh
# SCCS: @(#)AssemAll 1.1 07 Sep 1994
#
# Assembles all .s files using rspasm, translate the binary executable file
# into ascii hex for verilog, and translate the data file also into ascii hex.
#
cp csrc/suregre.h .
PATH=$PATH:../bin
for SRC in *.s; do
echo "*** WORKING ON :" $SRC "********"
# set DST = $SRC:t
# set DST = $DST:r
DST=`basename $SRC .s`
$ROOT/PR/rspasm1201/rspasm -o $DST $SRC
mv $DST $DST.bin
MAKE_IHEX $DST.lst > $DST.ihex
if [ `uname` = Linux ]; then
od -vt x1 $DST.dat | perl -p -e 's/ (\S\S) (\S\S) (\S\S) (\S\S)/ \1\2\3\4/g;' > $DST.dhex
else
od -vX $DST.dat > $DST.dhex
fi
# *** the following is no longer used. apply datasplit on ***
# *** $DST.dhex instead to get d_0.dhex ... d_f.dhex files. ***
# od -vX $DST.dat > tmp
# MAKE_DHEX tmp > $DST.dhex
# rm tmp
done