CP/M on i386
I;ve been interested in CP/M for a while. The source code for CP/M from “way back in the time tunnel” is available at the CHM and multiple other places. The challenge however was that CP/M source is in assembler code for 8080 and z80. I wanted to run it on i386 hardware.
So, with the help of Claude I took on a 2-step project:
- Have Claude reverse-engineer the CP/M assembler to C that produces, as close as possible to the same 8080 instructions when compiled.
- Have Claude create a build that can compile the new CP/M C source for 8080, z80 and i386.
The net result is here: working CP/M compiled from C for the three different processors. Here’s a screen capture of CP/M booting on i386 in Qemu

The CP/M apps are not there yet, but that’s CP/M running in i386!
The Github project is https://github.com/teverett/CP-M-C and you can read the new “C source” of CP/M there. It has exactly the same structure as the original assembler code.