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