@echo off
assets2banks ..\assets --compile
sdcc -c -mz80 --peep-file peep-rules.txt ..\main.c

@if %errorlevel% NEQ 0 goto :EOF

sdcc -o compression_test.ihx -mz80 --no-std-crt0 --data-loc 0xC000 ^
-Wl-b_BANK2=0x28000 ^
-Wl-b_BANK3=0x38000 ^
-Wl-b_BANK4=0x48000 ^
..\libs\crt0_sms.rel main.rel ^
bank2.rel ^
bank3.rel ^
bank4.rel ^
..\libs\SMSlib.lib

makesms compression_test.ihx ..\banks\compression_test.sms

echo clean up files
del *.lk
del *.map
del *.noi
del *.ihx
del *.rel
del *.lst
del *.sym
del *.asm

java -jar ..\emulicious\Emulicious.jar compression_test.sms