s3e: fix build break
[calu.git] / 3_test / exectest.sh
index eaf8ece6eb81ecfc5e6364747a38ebfa08a7a2c6..77ac27da596fbd76abddbc20ebad9b07eaa1ad0c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/bash
 
 ARG2=$2
 
@@ -22,6 +22,14 @@ runasm() {
        ../3a_asm/dtas < $ARG2 > ${ARG2%.s}.dthex
 }
 
+runasmbin() {
+       if [ "$ARG2" == ""  ]; then
+               echo "runasm: please provide a assembler file"
+               exit 1
+       fi
+       ../3a_asm/dtas -b < $ARG2 > ${ARG2%.s}_bin.dthex
+}
+
 runsim() {
        if [ "$ARG2" == ""  ]; then
                echo "runsim: please provide a dthex file"
@@ -43,8 +51,11 @@ case $1 in
        clean) cleantools;;
        build) buildtools;;
        asm) runasm;;
+       asmbin) runasmbin;;
        sim) runsim;;
        asmsim) runasmsim;;
-       *) echo "first argument must be clean|build|asm <file.s>|sim <file.dthex>|asmsim <file.s>"
+       *) echo "first argument must be clean|build|"
+          echo "asm <file.s>|asmbin <file.s>|"
+          echo "sim <file.dthex>|asmsim <file.s>"
 esac