    set S=src\systemid
    set D=lib\systemid.obj
    if not exist %S%.src goto err
    if exist %D% del %D%
    %SHC_DIR%\bin\asmsh %S% -CPU=SH4 -ENDIAN=LITTLE -INCLUDE=.,..,..\include,..\..\include -SJIS -OUTCODE=SJIS -O=%D% -CO=120 >>tmp\tags
    if not exist %D% goto err


    set S=src\zero
    set D=lib\zero.obj
    if not exist %S%.src goto err
    if exist %D% del %D%
    %SHC_DIR%\bin\asmsh %S% -CPU=SH4 -ENDIAN=LITTLE -INCLUDE=.,..,..\include,..\..\include -SJIS -OUTCODE=SJIS -O=%D% -CO=120 >>tmp\tags
    if not exist %D% goto err

    if not exist src\ip.sub goto err
    %SHC_DIR%\bin\lnk -o=tmp\ip.abs -sub=src\ip.sub >>tmp\tags
    %KATANA_SDK_DIR%\bin\rof2bin -v=00 -d tmp\ip.abs >>tmp\tags
    if ERRORLEVEL 1 goto err
    if not exist %D% goto err

    tool\binadj -0100 tmp\ip.bin $ip.$$$
    tool\binadj -0800 $ip.$$$ $ip8.$$$
    copy /b $ip8.$$$+$ip8.$$$+$ip8.$$$+$ip8.$$$+$ip8.$$$+$ip8.$$$+$ip8.$$$+$ip8.$$$ tmp\ip00.bin
    copy /b tmp\ip00.bin+$ip8.$$$+$ip8.$$$+$ip8.$$$+$ip8.$$$+$ip8.$$$+$ip8.$$$+$ip8.$$$+$ip8.$$$ tmp\ip00.bin
    del $ip*.$$$

	copy tmp\ip.bin ip.bin
	copy tmp\ip00.bin ip0000.bin

    if exist tmp\tags type tmp\tags
:err

