echo "A Forth Compiler in SED"
echo "(c)2003 Charles Childers"
echo "There is no warranty!"
echo "---------------------------------------------------------------"
echo "Preparing $1 for compilation"
grep -h \  $1 $2 $3 $4 $5 | sed -f ~/sedforth/framework/forth.sed >$1.asm.1

echo "Generating source code"
cp ~/sedforth/framework/skeleton $1.asm
cat $1.asm.1 >>$1.asm
cat ~/sedforth/framework/libretro >>$1.asm

echo "Compiling into Linux console application"
fasm $1.asm elf1
ld elf1 -oa.out
rm elf1 $1.asm.1 *~
