*** empty log message ***
[h316.git] / bin / frtn
index f89f7d150e4bb0a88e59f451425509193f0bbbc6..31195a86fa1ce3f45aca2eb10db739fbe243e930 100755 (executable)
--- a/bin/frtn
+++ b/bin/frtn
@@ -1,18 +1,57 @@
 #!/bin/sh
 # FORTRAN IV compiler wrapper for simh h316
 
+if [ "$FRTN_ORIGINAL" ]; then
+    LOGNAME="FORTRAN IV COMPILER (Original):"
+else
+    LOGNAME="FORTRAN IV COMPILER:"
+fi
+
 if [ ! $1 ] ; then
-    echo "Argument missing!"
+    echo "$LOGNAME Input file missing!"
     exit 2
 fi
 
 name=`basename $1 .f`
+if [ ! -f "$1" ]; then 
+    echo "$LOGNAME Input file \"$name\" not found!"
+    exit 2
+fi
+
+
 listfile=$name.lst
 
 cat $1 | tab | paron > $name.par
 rm  -f $name.lst
 rm  -f $name.obj
 
+echo -n "$LOGNAME Compiling \"$1\":"
+
+if [ "$FRTN_ORIGINAL" ]; then
+
+cat > $name.go <<EOF
+at ptr $H316/honeywell/slst/frtn_8k.slst
+boot ptr
+r
+at ptr $name.par
+at ptp $name.obj
+at tty3 $listfile
+set tty3 uascii
+set tty3 start
+d a 311
+;d a 310
+d p 1000
+d ss1 0
+d ss2 1
+d ss3 0
+d ss4 0
+go
+quit
+EOF
+
+
+else
+
 cat > $name.go <<EOF
 rest $H316/sys/frtn.sys
 r
@@ -32,11 +71,13 @@ go
 quit
 EOF
 
+fi
+
 h316 $name.go > /dev/null
 
 if cat $name.lst | egrep "[*]{36,40}">/dev/null 2>&1; then
        cat $name.lst
-       echo -e "\n\nFORTRAN IV compilation FAILED!"
+       echo -e " FAILED!"
        rm -f $name.obj
        exit 77
 fi
@@ -47,7 +88,7 @@ if [ !  $2  ]; then
        rm -f $name.par
 
 fi
-echo "FORTRAN IV compilation successfull."
+echo " Success."
 exit 0