CP/M (Control Program for Microcomputers) is a small disk-based operating system from the 1970s. It was originally only for computers with an 8080-compatible processor (including Z80 and 8085), but there are also versions for x86, 68000 and Z8000.

The main difference between CP/M and DOS is that while DOS programs commonly expect a degree of IBM PC hardware compatibility, the only common denominator in CP/M software is the CPU instruction set. Even terminal control codes such as cursor movement can't be expected to be the same across CP/M-compatible computers.

Porting CP/M to a new 8080/Z80-based computer involves rewriting a rather limited set of hardware subroutines in order to handle the disk and console I/O. This can be a much simpler task than e.g. physically building the hardware. This makes CP/M an appealing option for DIY computers and collapse computing.

For translating 8-bit CP/M software to x86 there was a rather sophisticated assembly source code translator called XLT86.