rem @echo off 
cd %2
\Utils\Vasm\vasmZ80_OldStyle_win32.exe %1  -chklabels -nocase -Dvasm=1 -DBuildSMS=1 -Fbin -o "\RelSMS\cart.sms" -L \RelSMS\Listing.txt

\Utils\BinaryTools.exe checksum "\RelSMS\cart.sms" $0000 $7FF0 "\RelSMS\cart.sms" $7FFA 16bit

if not "%errorlevel%"=="0" goto Abandon
cd \
Emu\Fusion\Fusion.exe RelSMS\cart.sms
exit
:Abandon
if "%3"=="nopause" exit
pause
