echo off
echo Constructing Kermit-MS version 2.30 for Hewlett Packard 110
echo and HP Portable PC
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 MSTHPX.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: msuhpx, msxhpx
for %%f in (msuhpx, msxhpx) do masm %%f;
echo End of Assembly step.

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