set CA_DIR=%~d0%~p0..\
set CA_COM="BKTurbo8.exe"
set CA_B2O="BKbin2obj.exe"

set ASSEMBLER=%CA_DIR%%CA_COM%
set BIN2OBJ=%CA_DIR%%CA_B2O%

%CA_DIR%BKTools.exe -tBKCRUNCH -r MPLAY.SCR
%BIN2OBJ% -sbin -lOUTICO mplay.crn
%BIN2OBJ% -sbin -lDIGIT DIGIT.SPR
%BIN2OBJ% -sbin -lWORK empty.dat

%ASSEMBLER% -l cl MP.ASM

%ASSEMBLER% -l li MPlay mp.obj digit.obj mplay.obj empty.obj

md out
copy mplay.bin out\*
copy *.lst out\*

del *.bin
del *.obj
del *.lst
del *.crn