

Port 2 is the data input and output port, and port 3 is the UART status/control port.
#PORT SOURCES LIST PORTING KIT SERIAL#
There is a single serial interface implemented that uses port addresses 2 and 3. There is no data transferred by these instructions, and there are no input ports implemented at addresses 0 or 1. An OUT (0),A instruction selects configuration 0 (2K ROM + 62K RAM), and an OUT (1),A instruction selects configuration 1 (all-RAM). Input/Output PortsĪs mentioned above, ports 0 and 1 are used to select the memory configuration. There are other ways to solve this problem of course, but with 2K of ROM present in configuration 0, subroutines can be stored there that will aid in bringing up the CP/M system. This dual configuration is needed to solve the issue presented by the Z80 CPU's requirement that some code be present at location 0x0000 when it is started, and CP/M's requirement that location 0x0000 be available for RAM. In configuration 1, the memory is all RAM from 0x0000 to 0xFFFF. In configuration 0, memory locations 0x0000 to 0x07FF are ROM, and locations 0x0800 to 0xFFFF are RAM. The computer system memory space takes on one of two configurations, software selected through OUT instructions to port 0 or port 1. My goal was to set up CP/M in the simplest way possible. The computer was designed to be extremely simple to build and understand, and as such does not implement interrupts or direct memory access, even though the Z80 can support these functions. This is to document how I set up CP/M 2.2 to run on a newly created Z80-based microcomputer, intended as a kit for hobbyists or educators. Setting up CP/M 2.2 on a New Z80 Computer
