echo off
echo Constructing Kermit-MS version 2.30 for IBM-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 MSVIBM.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: msgibm, msuibm, msxibm, msyibm, mszibm
for %%f in (msgibm, msuibm, msxibm, msyibm, mszibm) do masm %%f;
echo End of Assembly step.

Rem  Third, link the Object files, using the appropriate command file.
echo Starting Link step.
link @msvibm.lnk
if errorlevel 1 goto badlink
echo File MSVIBM.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
