echo off
echo Constructing Kermit-MS version 2.30 for Rainbow-100 PCs.
Break on
Rem  Assumes all files are on the current disk.
Rem  If there is insufficient disk space then the command
Rem  "masm filespec.asm;"
Rem  may be typed individually for each .asm file.
Rem  Note: files MSSDEF.H and MSVRB1.LNK must be in the current directory for
Rem  use by masm and link, respectively.

Rem  First, the system independent .asm files: msscmd, msscom, mssfil, mssker,
Rem  mssrcv, mssscp, msssen, mssser, mssset, msster, mssfin
if not exist mssdef.h goto noheader
echo Make an .OBJ file from each .ASM file.
for %%f in (msscmd, msscom, mssfil, mssker, mssrcv, mssscp) do masm %%f;
for %%f in (msssen, mssser, mssset, msster, mssfin) do masm %%f;

Rem  Second, the system dependent files: msugen, msxgen
for %%f in (msurb1, msxrb1) do masm %%f;
echo End of Assembly step.

Rem  Third, link the Object files, using the appropriate command file.
echo Starting Link step.
link @msvrb1.lnk
if errorlevel 1 goto badlink
echo File MSVRB1.EXE is built.
goto done
:noheader
echo ERROR - File MSSDEF.H is needed but could not be found.
goto done
:badlink
echo LINKING ERROR.
:done
echo on
