84a1533f |
1 | #!/bin/bash |
2 | # FORTRAN IV simple loading routine |
3 | |
8dc281af |
4 | |
84a1533f |
5 | if [ ! $1 ] ; then |
6 | echo "Argument missing!" |
7 | exit 2 |
8 | fi |
9 | |
8dc281af |
10 | if [ ! "$H316" ]; then |
11 | echo "H316 variable not set!" |
12 | exit 2 |
13 | fi |
14 | |
15 | if [ ! -e "$H316/config/libs.config" ]; then |
16 | echo "H316/config/libs.config not found!" |
17 | exit 2 |
18 | fi |
19 | |
20 | source "$H316/config/libs.config" |
21 | |
22 | #LOAD_LIBS="$H316/lib/fortran/lib/math.lib\ |
23 | # $H316/lib/fortran/lib/flib1.lib\ |
24 | # $H316/lib/fortran/lib/flib2.lib\ |
25 | # $H316/lib/fortran/lib/flib3.lib\ |
26 | # $H316/lib/iolib/lib/io.lib" |
27 | |
28 | |
84a1533f |
29 | objname=$1 |
30 | locname=`basename $1 .obj` |
31 | |
32 | echo $locname |
33 | echo $objname |
34 | |
84a1533f |
35 | cat > $locname.go <<EOF |
040533c5 |
36 | rest $H316/sys/super3.sys |
84a1533f |
37 | at ptr $objname |
040533c5 |
38 | run 36000 |
84a1533f |
39 | go |
40 | e p |
41 | EOF |
42 | |
8dc281af |
43 | for library in $LOAD_LIBS; do |
84a1533f |
44 | if [ ! -e "$library" ]; then |
45 | echo "Error: $library not found!" |
46 | exit 3; |
47 | fi |
48 | echo "at ptr $library" >> $locname.go |
49 | echo "go" >> $locname.go |
1f281d48 |
50 | echo "! echo loading $library" >> $locname.go |
84a1533f |
51 | done |
52 | |
53 | cat >> $locname.go <<EOF |
1f281d48 |
54 | ! echo -e "\n************************" |
040533c5 |
55 | run 36002 |
84a1533f |
56 | ! echo -e "\n************************" |
040533c5 |
57 | set cpu history=65536 |
58 | set break 0-17 |
84a1533f |
59 | EOF |
60 | |
61 | #cat $locname.go |
62 | h316 $locname.go |
63 | rm -f $locname.go |
64 | |
65 | exit 0 |
66 | |
67 | |
68 | |