Menu Close

Serial Port Interfacing to the Z-100 – Part 2 (CP/M 2.2)

Establishing a serial link in CP/M 2.2 was a little bit more challenging than on the ZDOS side of things. There were no CP/M terminal programs on disk so I had to download a CP/M terminal program with a ZDOS client first onto a DOS floppy, then use a program called COPYDOS to copy from the DOS floppy over to a CP/M-formatted floppy.  COPYDOS can only read DOS 2.0 formatted so I had to find and boot a DOS 2.0 floppy in order to format a DOS 2.0 scratch disk for the transfer.  Once all of that was done, I had a working native CP/M 2.2 terminal program and could begin investigating and modifying the existing terminal programs to get the best speed possible with the technology.  The Z-100’s UART chip is a Motorola MC2661B (aka 2661-2).  The data sheet for the 2661 is contained in the appendices of the Z-100 Technical manual (gotta love Zenith’s great documentation).  The 2661 is limited to a maximum baud rate of 38400 bps but the transfer rates are more determined by how optimized the terminal programs are.  After a little bit of Assembly hacking, I’ve optimized two CP/M terminal programs, IMP and MEX, for 38400 baud data rates.  I used the same techniques to optimize IMP and MEX that I used for the PCPI high speed serial I/O card on my Apple IIe a couple of years ago.  

CP/M Terminals and Overlays

Most CP/M terminal programs use a technique called overlays to allow them to work with a wide variety of CP/M system hardware.  An overlay is just a patch file to the existing terminal’s .COM program.  You use a program like MLOAD to merge the patch file into the main .COM program.  The .zip files on this site contain the precompiled binaries, the source files if available and build scripts in .sub files in case you want to make further modifications.

CP/M Terminal Programs for the Z-100


IMP just rocks!  It has a great user interface, is very fast and supports both XModem and YModem protocols. YModem lets you do batch transfers like Kermit.  IMP’s source has been released so it was fully optimizable up the limit of the Z-100’s UART baud rate allowing for 38400 baud uploads and downloads.  I left the IMP245 source code platform neutral so you should be able to modify non-Z100 overlays to work with high speed IMP.  

At some point, I’ll have to get the Kaypro out and see how fast I can get IMP to work with it. With the TurboROM installed, I bet the Kaypro can easily do 57600 speeds.

Update: I took a cursory look at souping up IMP for my Kaypro 4-84 but it turns out the Kaypro 4-84 uses a General Instruments 8116 Baud Rate Controller chip which has a maximum baud rate of 19200 bps so I’m already at max rate for the Kaypro unless I make motherboard changes.  The changes would require replacing the GI8116 with a COM8116 which is pin compatible and also replacing the 5.0688Mhz crystal next to the chip with a 5.52960 MHz crystal. The COM version of the 8116 can support up to 38.4k.  It’s a minor change for twice the baud rate so I might do this in the near future.  The only drawback is I would lose compatibility with any terminal program where I don’t have source code or overlay access like Mite because I have to adjust the baud rate values sent to the 8116 for each speed step.


Mex is pretty good.  There was already a Z-100 overlay available  with settings up 19200. I was able to get MEX working with 38400 uploads but downloads are still limited to 9600 baud. I also had a problem exiting terminal mode. The escape sequence isn’t working. It’s probably something in the overlay but with IMP working so well, I’m not planning on doing any more MEX mods.


Unfortunately, this CP/M port of Kermit for the Z-100 was terrible.  I couldn’t get better than 1200 baud transfer rates.  Kermit won’t be a good option for file transfers on the Z-100 but thankfully there are better options like IMP and MEX.


QTerm is a great terminal program and even supports Kermit. Unfortunately, QTerm was written in Z80 assembly and isn’t compatible with the Z-100’s 8080 CPU.

So with high speed serial communications fully operational in both ZDOS and CP/M modes, it’s now time to begin the great archiving of Z-100 software. 

Stay tuned.