sizecheck 573 Bytes
#!/bin/sh
for mfil in $*
do
    #mc=${mfil%.o}
    mc=`basename $mfil .o`
# assume the last instruction is a nop, let it be...
#    theword=`grep '0x04002000 : 0x' $mc.u.lst 2> /dev/null`
    theword=`grep '0x04002004 : 0x' $mc.u.lst 2> /dev/null`

#    if [ ${theword%%x*} = 0 ]
    if [ -n "$theword" ]
    then
echo "#########################################################################"
echo "###"
echo "### WARNING   $mc overflowed imem space !!!!!!"
echo "### `tail -1 $mc.u.lst`"
#mcfile=${mc%.u.lst}
#rm -i $mcfile
#rm -i $mcfile.o
rm -i $mc $mc.o
    fi

done