*** empty log message ***
[h316.git] / bin / frtn
CommitLineData
30773ad6 1#!/bin/sh
c08e22bb 2# FORTRAN IV compiler wrapper for simh h316
3
4if [ ! $1 ] ; then
b0031f2a 5 echo "Argument missing!"
c08e22bb 6 exit 2
7fi
8
9name=`basename $1 .f`
10listfile=$name.lst
11
12cat $1 | tab | paron > $name.par
13rm -f $name.lst
14rm -f $name.obj
15
30773ad6 16cat > $name.go <<EOF
e5cd2df3 17rest $H316/sys/frtn.sys
30773ad6 18r
19at ptr $name.par
20at ptp $name.obj
21at tty3 $listfile
22set tty3 uascii
23set tty3 start
24d a 311
fa105a9b 25;d a 310
30773ad6 26d p 1000
27d ss1 0
28d ss2 1
29d ss3 0
30d ss4 0
31go
4dafd752 32quit
30773ad6 33EOF
34
c08e22bb 35h316 $name.go > /dev/null
c08e22bb 36
37if cat $name.lst | egrep "[*]{36,40}">/dev/null 2>&1; then
38 cat $name.lst
39 echo -e "\n\nFORTRAN IV compilation FAILED!"
40 rm -f $name.obj
41 exit 77
42fi
43
44if [ ! $2 ]; then
45 rm $name.lst
fa105a9b 46 rm -f $name.go
47 rm -f $name.par
48
c08e22bb 49fi
50echo "FORTRAN IV compilation successfull."
51exit 0
52
53
54