@echo off 
cd %2
\Utils\Vasm\vasmZ80_OldStyle_win32.exe %1 -chklabels -nocase -gbz80 -Dvasm=1 -DBuildGMB=1 -Fbin -o \RelGB\cart.gb -L \RelGB\Listing.txt
if not "%errorlevel%"=="0" goto Abandon
taskkill -im VisualBoyAdvance.exe
copy \Emu\VisualBoyAdvance\gb.ini \Emu\VisualBoyAdvance\vba.ini
start \Emu\VisualBoyAdvance\VisualBoyAdvance.exe \RelGB\cart.gb
exit
:Abandon
if "%3"=="nopause" exit
pause
