Recompiling CP/M 3 from the sources
z80pack release 1.9 or higher is required, releases before will not work.
Also the CP/M 2 disk that came with z80pack is needed, if you modified the disk make sure that your copy includes submit, xsub, sysgen and the SLR Z80 assembler (z80asm).
The archive with disk images and scripts to mount disks can be downloaded here. Unpack the archive under ~/z80pack-x.y/cpmsim with tar xzvf cpm3src.tgz.
Drives A: and B: are used for the OS and build tools. Drives C: and D: are empty disks used as scratch. Drive I: contains the CP/M 3 sources and build scripts. Drive J: is used to build everything on and later bootable disks in C: and D: will be created from the build on J:
Instructions for compiling:
First make sure that the disk drives C, D, I and J are empty. Then for the first step run cpm3src-p1. This mounts a CP/M 3 tool disk on A:, drive B: is left empty, drive C: and D: get formated, CP/M 3 sources are mounted on drive I: and drive J: gets formated.
To build the assembler parts of CP/M 3 run the following scripts:
submit i:cpm3asm1 submit i:cpm3asm2 submit i:cpm3asm3 submit i:cpm3ldr submit i:cpm3bios submit i:cpm3utlThe resulting binaries are on drive J.
Because the ISIS environment needed to compile PL/M-80 sources doesn't run
under CP/M 3, we need to switch our machine to a CP/M 2 environment now.
For this leave CP/M with the command a:bye and execute
cpm3src-p2. This will replace disks in drive A: and B: with CP/M 2
and ISIS tools to build the PL/M-80 programs. The binaries will be build
on drive D:. Drive C: will be used as scratch disk for the build process.
To compile everything run:
submit i:cpm3plm0 submit i:cpm3plm1 submit i:cpm3plm2 submit i:cpm3plm3 submit i:cpm3plm4 submit i:cpm3plm5 submit i:cpm3plm6 submit i:cpm3plm7The resulting binaries are on drive D: and C: should be clean.
One program was written in PL/I-80, another tool disk is required.
Leave the emulation and run script cpm3src-p3. This mounts
a tool disk with PL/I-80 compiler in A: and B: is left empty.
To compile the program run:
submit i:cpm3pli1The build program is on drive D: and C: should be clean.
To build the OS disks CP/M 3 is needed again, so leave the emulation with a:bye. Just run cpm3src-p1 again, ignore the complains and start the emulation with cpmsim. Copy everything from D: to J: and clean D: with:
pip j:=d:*.* era d:*.*To put a working CP/M 3 operating system on the empty disks in drive C: and D: run:
Creating a bootable disk:
The CP/M 2 sysgen program is used to write the boot tracks, so leave the emulation with a:bye and run cpm2 to mount CP/M 2 disks in drive A: and B: and run:
submit i:cpm3bootThe sysgen program can't be scripted with xsub/submit, so after sid loaded the boot bits it waits at the prompt:
A>submit i:cpm3boot A>xsub A>d: D>a:z80asm boot/h Z80 ASSEMBLER Copyright (C) 1983 by SLR Systems Rel. 1.30 #F10268 BOOT/H End of file Pass 1 0 Error(s) Detected. 256 Absolute Bytes. 12 Symbols Detected. (xsub active) D>c:sid a:sysgen.com CP/M 3 SID - Version 3.0 NEXT MSZE PC END 0500 0500 0100 C6FF #f900,3000,0 #rboot.hex,900 NEXT MSZE PC END 092D 092D 0100 C6FF #rcpmldr.com,880 NEXT MSZE PC END 1500 1500 0100 C6FF #rc:ccp.com,1500 NEXT MSZE PC END 2280 2280 0100 C6FF #Now run sysgen under control of sid to write the boot bits to the system tracks of drive C:
#g100 SYSGEN VER 2.0 SOURCE DRIVE NAME (OR RETURN TO SKIP) DESTINATION DRIVE NAME (OR RETURN TO REBOOT)c DESTINATION ON C, THEN TYPE RETURN FUNCTION COMPLETE DESTINATION DRIVE NAME (OR RETURN TO REBOOT) D>Put the both disks in C: and D: into drives A: and B: and run cpmsim to boot from this disks. If everything works remove ccp.com from A: and try to boot again, the system tracks include ccp and the system still should boot.