global: Small fixes to asm scripts ("==" problem)
[h316.git] / bin / asm
diff --git a/bin/asm b/bin/asm
index cbf6847c4dca428d68350a5c927b0636c909e9cb..03336f9b4ccbb2876dd6b871d87383f55900de2a 100755 (executable)
--- a/bin/asm
+++ b/bin/asm
@@ -2,12 +2,14 @@
 # Assembler wrapper for simh h316
 
 if [ ! $1 ] ; then
-    echo "Argument missing!"
+    echo -e "Assembler: Input file missing!"
     exit 2
 fi
 
+echo -en "Assembler: Translating \"$1\":"
+
 for n in $*; do
-  if [ $n == "/v" ]; then
+  if [ $n = "/v" ]; then
     VERBOSE=yes
   fi
 done
@@ -22,6 +24,7 @@ rm  -f $name.obj
 
 cat > $name.go <<EOF
 rest  $H316/sys/dap.sys
+r
 d a 120420
 d p 1000 
 at ptr $name.par 
@@ -35,24 +38,24 @@ go
 quit 
 EOF
 
-if [ "$VERBOSE" == "yes" ]; then
+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