summaryrefslogtreecommitdiff
path: root/tools/VMEmulator.bat
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2022-08-16 11:53:39 +0800
committerFrederick Yin <fkfd@fkfd.me>2022-08-16 11:53:39 +0800
commit9c0cb1d1c32724fc95ac9548e4f8d873d3adaccc (patch)
tree1c12cfcb04dd4e298ddf6c4a5b8d10ea3c4ad47c /tools/VMEmulator.bat
nand2tetris software suite
Diffstat (limited to 'tools/VMEmulator.bat')
-rw-r--r--tools/VMEmulator.bat29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/VMEmulator.bat b/tools/VMEmulator.bat
new file mode 100644
index 0000000..1b15b72
--- /dev/null
+++ b/tools/VMEmulator.bat
@@ -0,0 +1,29 @@
+@echo off
+
+rem $Id: VMEmulator.bat,v 1.3 2014/05/10 00:51:55 marka Exp $
+rem mark.armbrust@pobox.com
+
+setlocal
+if not "%2"=="" goto :USAGE
+if "%~1"=="/?" (
+:USAGE
+ echo Usage:
+ echo VMEmulator Starts the VM Emulator in interactive mode.
+ echo VMEmulator FILE.tst Starts the VM Emulator and runs the FILE.tst test
+ echo script. The success/failure message is
+ echo printed to the command console.
+ 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/Simulators.jar;bin/lib/SimulatorsGUI.jar;bin/lib/Compilers.jar" ^
+ VMEmulatorMain
+) else (
+rem echo Running "%_arg1%"
+ java -classpath "%CLASSPATH%;.;bin/classes;bin/lib/Hack.jar;bin/lib/HackGUI.jar;bin/lib/Simulators.jar;bin/lib/SimulatorsGUI.jar;bin/lib/Compilers.jar" ^
+ VMEmulatorMain "%_arg1%"
+)
+popd