#!/bin/sh

for file in *.c
do 
	echo "compiling file $file ..."

echo    "gcc -mno-accumulate-outgoing-args -S $file -o $file.s"
        gcc -mno-accumulate-outgoing-args -S $file -o $file.s
echo    "gcc -mno-accumulate-outgoing-args -c -g -Wa,-a,-ad $file > $file.asm.lst"
        gcc -mno-accumulate-outgoing-args -c -g -Wa,-a,-ad $file > $file.asm.lst
echo    "as -a $file.s -o $file.o > $file.s.list"
        as -a $file.s -o $file.o > $file.s.list 

done


echo "Premere un tasto per terminare e chiudere questa finestra" 
read  dummy
echo
echo "ciao"
echo ""
sleep 2
exit
