*** empty log message ***
[h316.git] / bin / fload
CommitLineData
84a1533f 1#!/bin/bash
2# FORTRAN IV simple loading routine
3
8dc281af 4
84a1533f 5if [ ! $1 ] ; then
6 echo "Argument missing!"
7 exit 2
8fi
9
8dc281af 10if [ ! "$H316" ]; then
11 echo "H316 variable not set!"
12 exit 2
13fi
14
15if [ ! -e "$H316/config/libs.config" ]; then
16 echo "H316/config/libs.config not found!"
17 exit 2
18fi
19
20source "$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 29objname=$1
30locname=`basename $1 .obj`
31
32echo $locname
33echo $objname
34
84a1533f 35cat > $locname.go <<EOF
040533c5 36rest $H316/sys/super3.sys
84a1533f 37at ptr $objname
040533c5 38run 36000
84a1533f 39go
40e p
41EOF
42
8dc281af 43for 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 51done
52
53cat >> $locname.go <<EOF
1f281d48 54! echo -e "\n************************"
040533c5 55run 36002
84a1533f 56! echo -e "\n************************"
040533c5 57set cpu history=65536
58set break 0-17
84a1533f 59EOF
60
61#cat $locname.go
62h316 $locname.go
63rm -f $locname.go
64
65exit 0
66
67
68