From 9c0cb1d1c32724fc95ac9548e4f8d873d3adaccc Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Tue, 16 Aug 2022 11:53:39 +0800 Subject: nand2tetris software suite --- tools/CPUEmulator.bat | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tools/CPUEmulator.bat (limited to 'tools/CPUEmulator.bat') diff --git a/tools/CPUEmulator.bat b/tools/CPUEmulator.bat new file mode 100644 index 0000000..f92cf40 --- /dev/null +++ b/tools/CPUEmulator.bat @@ -0,0 +1,29 @@ +@echo off + +rem $Id: CPUEmulator.bat,v 1.3 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 CPUEmulator Starts the CPU Emulator in interactive mode. + echo CPUEmulator FILE.tst Starts the CPU Emulator and runs the FILE.tst + echo test script. The success/failure message + echo is 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" ^ + CPUEmulatorMain +) 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" ^ + CPUEmulatorMain "%_arg1%" +) +popd -- cgit v1.2.3