REM Replace C loader object code in the system library used by the Megamax linker
REM Compile source code file to object file
MMCC.TTP %1\INIT.C %4
IF EXISTS ERRORS.OUT COPY ERRORS.OUT %2\%3.ERR
REM Copy object file
COPY %1\INIT.O %2\%3.O
IF NOT EXISTS \SOURCE\INIT.O COPY %1\INIT.O \SOURCE\INIT.O
REM Disassemble object file to assembly file
IF EXISTS \SOURCE\ASSEMBLY.TXT MMDIS.TTP %2\%3.O -o %2\%3.S
REM Delete current INIT.O from Megamax C system library
MMLIB.TTP dv \MEGAMAX\SYSLIB INIT.O
REM Register new INIT.O in Megamax C system library
MMLIB.TTP rv \MEGAMAX\SYSLIB INIT.O
REM Delete object file
DEL %1\INIT.O
DEL \SOURCE\INIT.O
