diff options
author | Frederick Yin <fkfd@fkfd.me> | 2022-08-16 11:53:39 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2022-08-16 11:53:39 +0800 |
commit | 9c0cb1d1c32724fc95ac9548e4f8d873d3adaccc (patch) | |
tree | 1c12cfcb04dd4e298ddf6c4a5b8d10ea3c4ad47c /tools/Assembler.bat |
nand2tetris software suite
Diffstat (limited to 'tools/Assembler.bat')
-rw-r--r-- | tools/Assembler.bat | 27 |
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
|