Building CP/M 3

This is based on my experiences building the CP/M 3 utility programs from the source supplied at www.cpm.z80.de. This site also contains a PL/M compiler, which runs in an ISIS emulator under DOS.

Setting up

The first thing to do is to get the ISIS emulator set up. I created a file called ENV.BAT, which sets up the correct environment variables for it:

rem These variables are my guidelines, not law :-)
rem :F0: should hold the source code
rem :F1: should hold the PL/M-80 compiler
rem :F2: should hold the ASM-80 assembler
rem :F3: should hold the ISIS libraries and emulator

SET :F0:=D:\TOOLS\PLM\DIR
SET :F1:=D:\TOOLS\PLM\PLM80
SET :F2:=D:\TOOLS\PLM\ASM80
SET :F3:=D:\TOOLS\PLM\UTILS

It should now be possible to use the emulator. The easiest way of doing this is to have scripts that it runs - so you would type ISIS <DATE.MAK, and DATE.MAK would in turn contain:

:F1:plm80 date.plm pagewidth(100) debug optimize 
:F3:link mcd80a.obj,date.obj,:F1:plm80.lib to date.mod
:F3:locate date.mod code(0100H) stacksize(100)
:F3:objhex date to date.hex
exit

Assembling

Some of the CP/M 3 build process uses the tools supplied with CP/M - MAC, RMAC, LINK, GENCOM and HEXCOM (instead of objcpm, which isn't supplied, it is necessary to use objhex within ISIS and HEXCOM outside it). The program ZXCC is a miniature CP/M emulator which can run these tools. So where the SUB file reads

MAC DUMP
your script can read
ZXCC MAC.COM DUMP
.
John Elliott 25-5-1998