summaryrefslogtreecommitdiff
path: root/tools/Assembler.bat
diff options
context:
space:
mode:
Diffstat (limited to 'tools/Assembler.bat')
-rw-r--r--tools/Assembler.bat27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/Assembler.bat b/tools/Assembler.bat
new file mode 100644
index 0000000..93260ec
--- /dev/null
+++ b/tools/Assembler.bat
@@ -0,0 +1,27 @@
+@echo off
+
+rem $Id: Assembler.bat,v 1.2 2014/05/10 00:52:43 marka Exp $
+rem mark.armbrust@pobox.com
+
+setlocal
+if not "%2"=="" goto :USAGE
+if "%~1"=="/?" (
+:USAGE
+ echo Usage:
+ echo Assembler Starts the assembler in interactive mode.
+ echo Assembler FILE[.asm] Assembles FILE.asm to FILE.hack.
+ exit -b
+)
+if not "%~1"=="" (
+ set "_arg1=%~f1"
+)
+pushd "%~dp0"
+if "%~1"=="" (
+ start javaw -classpath "%CLASSPATH%;bin/classes;bin/lib/Hack.jar;bin/lib/HackGUI.jar;bin/lib/Compilers.jar;bin/lib/AssemblerGUI.jar;bin/lib/TranslatorsGUI.jar" ^
+ HackAssemblerMain
+) else (
+ echo Assembling "%_arg1%"
+ java -classpath "%CLASSPATH%;bin/classes;bin/lib/Hack.jar;bin/lib/HackGUI.jar;bin/lib/Compilers.jar;bin/lib/AssemblerGUI.jar;bin/lib/TranslatorsGUI.jar" ^
+ HackAssemblerMain "%_arg1%"
+)
+popd