


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

cd %BuildPath%

\Utils\Vasm\vasmZ80_OldStyle_win32.exe %BuildFile%  -chklabels -nocase -Dvasm=1 -DBuildZX8=1 -Fbin -o "\RelZX8\tape.p" -L \BldZX8\Listing.txt

@if not "%errorlevel%"=="0" goto Abandon

@rem \utils\bin2p \BldZX8\prog.bin \RelZX8\tape.p
@rem if not "%errorlevel%"=="0" goto Abandon

cd \Emu\ZEsarUX\

Zesarux.exe --machine ZX81 --tape \RelZX8\tape.p >nul

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