@echo --------------------------------
@echo  COMPILE:
@echo --------------------------------

@cd /d "%~dp0"
@cd /d "compile"

@del /Q "effect.bin.mlz" 2>NUL
@del /Q "effect.bin.pl5" 2>NUL
@del /Q "pg0.bin" 2>NUL
@del /Q "pg0.bin.mlz" 2>NUL
@del /Q "pg0.bin.pl5" 2>NUL
@del /Q "pg1.bin" 2>NUL
@del /Q "pg1.bin.mlz" 2>NUL
@del /Q "pg1.bin.pl5" 2>NUL
@del /Q "pg7.bin" 2>NUL
@del /Q "pg7.bin.mlz" 2>NUL
@del /Q "pg7.bin.pl5" 2>NUL
@cd /d "%~dp0"
@
@
@sjasmplus.exe --msg=err kernal.asm
@
@
@for /f %%i in ("compile/effect.bin") do @set SizeBin=%%~zi
@for /f %%i in ("compile/pg0.bin") do @set SizeBin0=%%~zi
@for /f %%i in ("compile/pg1.bin") do @set SizeBin1=%%~zi
@for /f %%i in ("compile/pg7.bin") do @set SizeBin7=%%~zi

@set /p input="1 to execute trd, 2 to execute tap"
@if %input% == 1 start demo.trd
@if %input% == 2 start demo.tap
