It is easy enough to port CP/M onto a given computer...
... Some might say, too easy. That's how MSDOS came about.
When IBM built the PC, they approached Digital Research to write the
operating system for it. For reasons lost in the depths of myth, an
agreement could not be reached (there is no truth in the rumour that
Dr Gary Kildall chose to spend the day flying his plane rather than talk
to the IBM representatives), so IBM asked Microsoft instead. Microsoft
didn't have an operating system, but they knew someone who did - Tim
Paterson of Seattle Computer Products.
QDOS (also known as 86-DOS) was written as a direct port of CP/M 2
to the 8086. Several useful features went missing on the way, and the
end result was an 8-bit operating system for a 16-bit computer. Microsoft
replaced the extent file system with their own
FAT system, and thus was born MSDOS 1. Most of the inadequacies of
MSDOS can be traced back to this ancestry.