global: Small fixes to asm scripts ("==" problem)
[h316.git] / bin / asm
diff --git a/bin/asm b/bin/asm
index b7321f5f095e60667ad8af0de9f906d51f3dedc8..03336f9b4ccbb2876dd6b871d87383f55900de2a 100755 (executable)
--- a/bin/asm
+++ b/bin/asm
@@ -2,10 +2,18 @@
 # Assembler wrapper for simh h316
 
 if [ ! $1 ] ; then
-    echo "Argument mising!"
+    echo -e "Assembler: Input file missing!"
     exit 2
 fi
 
+echo -en "Assembler: Translating \"$1\":"
+
+for n in $*; do
+  if [ $n = "/v" ]; then
+    VERBOSE=yes
+  fi
+done
+
 name=`basename $1 .asm`
 listfile=$name.lst
 
@@ -16,7 +24,9 @@ rm  -f $name.obj
 
 cat > $name.go <<EOF
 rest  $H316/sys/dap.sys
-d a 120420 
+r
+d a 120420
+d p 1000 
 at ptr $name.par 
 at ptp $name.obj 
 at tty3 $listfile 
@@ -28,20 +38,24 @@ go
 quit 
 EOF
 
-h316 $name.go > /dev/null
+if [ "$VERBOSE" = "yes" ]; then
+  h316 $name.go 
+else
+  h316 $name.go > /dev/null
+fi
 
-rm -f $name.par
-rm -f $name.go
 
 if cat $name.lst | grep "NO ERRORS IN ABOVE ASSEMBLY">/dev/null 2>&1; then
        if [ !  $2  ]; then
                rm $name.lst
+               rm -f $name.par
+               rm -f $name.go
        fi
-       echo "DAP-16 assembly successfull :-)"
+       echo " Success."
        exit 0
 fi
 cat $name.lst
-echo -e "\nDAP-16 assembly FAILED!"
+echo -e " FAILED!"
 rm -f $name.obj
 exit 77