@echo off 

if not exist \utils\Mars\Mars4_5.jar goto EmulatorFail

set BuildFile=%1
set BuildPath=%2
if exist \utils\SelectedBuildFile.bat call \utils\SelectedBuildFile.bat 

cd %BuildPath%\

\Utils\Java\bin\java -jar \utils\Mars\Mars4_5.jar db nc smc %BuildFile%

rem nc=no copyright SMC= self modifying code (write data seg)

goto Abandon

:InvalidPath
echo Error: ASM file must be on same drive as devtools 
echo File: %BuildPath%\%BuildFile% 
echo Devtools Drive: %CD:~0,1% 
goto Abandon

:EmulatorFail
echo Error: Can't find \utils\Mars\Mars4_5.jar

:Abandon
if "%3"=="nopause" exit
pause
