CPM predated MS Dos... I believe... CP/M was well before MS-DOS, that's correct. It ran on the 8080/8085 microcomputer. And IBM initially was going to use CP/M on the first PC, but wound up working with Microsoft instead. CP/M lost huge market share during that process as people moved from microcomputers to PCs.
Something I didn't know until reading tonight....CP/M eventually (over several iterations) became DR-DOS.