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

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

%ASSEMBLER% -l -tTL CL Bally_TapeLoader.asm
%ASSEMBLER% -l -tML CL Bally_Loader.asm
%ASSEMBLER% -lTapeLoader_l -r LI TapeLoader Bally_TapeLoader.obj ML_tbl.obj
%ASSEMBLER% -lBALLY LI BALLY Bally_Loader.obj TL_tbl.obj

%BIN2OBJ% -sbin -lPicData -fPicDataEnd Bally_PicData.dat
%ASSEMBLER% -l cl Bally_pic.asm
%ASSEMBLER% -lBally_pic_l li BALLY.PIC Bally_pic.obj Bally_PicData.obj ML_tbl.obj TL_tbl.obj

%ASSEMBLER% -l -o -r co Bally_game.asm
%ASSEMBLER% -l cl Bally_game_preparer.asm
%ASSEMBLER% -lBally_gmc_l li BALLY.GMC Bally_game_preparer.obj Bally_game.obj



md out
copy *.bin out\*
rem copy *.raw out\*
rem copy *.lst out\*

del *.bin
del *.raw
del *.obj
del *.lst
