It wasn't a "base to start with". MS Dos was QDOS. I was a summer intern in the early 1980s with IBM in Kingston, NY, and had access to the source. Gates didn't even bother to remove the SCP copyright notice from the comments, nor the references to QDOS. Too bad "sed" and "awk" weren't available for search and replace back then.
Much of the remaining QDOS/PCDOS work was probably adapting to the IBM BIOS.
from Tim Paterson's website, https://web.archive.org/web/20190722012644/http://www.paters...