# FORTRAN IV simple executor
if [ ! $1 ] ; then
- echo "Argument fehlt!"
+ echo "Argument missing!"
exit 2
fi
-name=`basename $1 .obj`
+objname=$1
+locname=`basename $1 .obj`
+
+echo $locname
+echo $objname
LIBS="$H316/lib/fortran/lib/flib1.lib\
$H316/lib/fortran/lib/flib2.lib\
$H316/lib/iolib/lib/io.lib\
"
-echo "rest $H316/sys/super2.sys" > $name.go
-echo "at ptr $name.obj" >> $name.go
-echo "go" >> $name.go
-echo "go" >> $name.go
+cat > $locname.go <<EOF
+rest $H316/sys/super2.sys
+at ptr $objname
+go 36000
+go
+e p
+EOF
for library in $LIBS; do
if [ ! -e "$library" ]; then
echo "Error: $library not found!"
exit 3;
fi
- echo "at ptr $library" >> $name.go
- echo "go" >> $name.go
+ echo "at ptr $library" >> $locname.go
+ echo "go" >> $locname.go
done
-echo "r" >> $name.go
-echo "! echo -e \"\\n************************\"" >> $name.go
-echo "run 1000" >> $name.go
-echo "! echo -e \"************************\"" >> $name.go
-#echo "quit" >> $name.go
-
+
+cat >> $locname.go <<EOF
+r
+! echo -e "\n************************"
+run 1000
+! echo -e "************************"
+;quit
+EOF
-#cat $name.go
-h316 $name.go
+#cat $locname.go
+h316 $locname.go
-rm -f $name.par
-rm -f $name.go
+rm -f $locname.go
exit 0