Instruction manual
Permission to use CP/M for hobbyist and educational purposes has generally been granted freely, but
since I am a commercial enterprise I cannot give you a complete, assembled CP/M system to
download.
However, there is a web archive of CP/M software, “The Unofficial CP/M Web Site”, that has been
granted a license by Lineo, Inc., to make available CP/M source code for download for educational
purposes. The site can be found at http://www.cpm.z80.de/
I am allowed to create a CBIOS tailored to the CPUville Z80 computer with the disk and memory
expansion, and provide this directly to you. However, you will have to download and assemble your
own BDOS and CCP for CP/M 2.2. This should be easy, since there is source code written in Z80
mnemonics that will assemble with only a few modifications.
To obtain the source code for CP/M 2.2 in Z80 assembly language, follow the Digital Research Source
Code link on the Unofficial CP/M Web Site page to the source code page
(http://www.cpm.z80.de/source.html). On this page, go to the CP/M 2.2 section, and download the .zip
file labeled CP/M 2.2 ASM SOURCE (http://www.cpm.z80.de/download/cpm2-asm.zip). Unzip the
file. The source code file CPM22.Z80 is the one we will use. It contains source code for the CCP and
BDOS in Z80 assembly language.
We need to make some modifications to this source code. First, we need to change the code origin so
that it will assemble for a 64K system. Open the file with a text editor. At the start of the file is the
MEM constant that tells the assembler how large the system memory is. Change this from 62 to 64,
since we will run our CP/M in an all-RAM, 64K system:
MEM EQU 64 ;for a 64k system (TS802 TEST - WORKS OK).
The file contains a few errors that are the result of converting the original 8080 code to Z80 code. Here
is one example:
;
CHECKSUM: LD C,128 ;length of buffer.
LD HL,(DIRBUF) ;get its location.
XOR A ;clear summation byte.
CHKSUM1: ADD A,M ;and compute sum ignoring carries.
INC HL
DEC C
JP NZ,CHKSUM1
RET
;
In the ADD A,M instruction, M stands for “memory”, and is used in 8080 code. In Z80 code, this is
supposed to be (HL). Your assembler will probably find these errors and alert you, and you will have
to change them. You can also find them by searching the file for the pattern “,M”. There are only a few
of these errors in the file. The correct Z80 code should be:
;
CHECKSUM: LD C,128 ;length of buffer.
LD HL,(DIRBUF) ;get its location.
XOR A ;clear summation byte.
19










