This is my first post on this group - forgive me if this topic is old.
I couldn't find a decent XMODEM program for CP/M that would allow me to send and receive files to/from my various vintage machines via their serial ports - so I wrote one. (I usually assemble CP/M code in a 22NICE environment on a (virtual) PC, then send it to the target machine using Hyperterm, which supports the XMODEM protocol.)
My version of XMODEM uses the CP/M RDR: and PUN: devices for I/O. Since there is no RDR STATUS function call in CP/M, I require the BIOS RDR device driver to return with Z set if the receiver is not ready - rather than hanging forever, waiting on the received data - a pretty simple BIOS tweak, though non-standard.
If you don't like this tweak, you can easily modify my code to talk to your I/O port directly - the comments show you where and how to do this.
This is a nice little version - it takes up only 2K of disk space, and requires less than 8K of available memory, including its buffer. It does both checksum and CRC versions of XMODEM, for both send and receive.
On a 4 MHz Z80, it can keep up at 38.4K baud without hardware handshaking. I think the upper limit (without hardware handshaking) for a 2 MHz 8080 is 19.2K baud.
Note that my code can tell the difference between an 8080 and a Z80. It assumes an 8080 is running at 2 MHz, and that a Z80 is running at 4 MHz - timing loops are used for timeouts.
The source code assembles with Digital Research's ASM. You can find my source code here:
https://docs.google.com/file/d/0B-XdfCubTNJJMXlrVHA4WHRvVjQ/edit?usp=sharing
Enjoy :-)