As for an operating system (OS) for the new computers, since Microsoft had never written an operating system before, Gates had suggested that IBM investigate an OS called CP/M (Control Program for Microcomputers), written by Gary Kildall of Digital Research. Kindall had his Ph.D. in computers and had written the most successful operating system of the time, selling over 600,000 copies of CP/M, his OS set the standard at that time.
IBM tried to contact Kildall for a meeting, executives met with Mrs. Kildall who refused to sign a non-disclosure agreement. IBM soon returned to Bill Gates and gave Microsoft the contract to write the new operating system, one that would eventually wipe Kildall's CP/M out of common use.
The "Microsoft Disk Operating System" or MS-DOS was based on QDOS, the "Quick and Dirty Operating System" written by Tim Paterson of Seattle Computer Products, for their prototype Intel 8086 based computer.
QDOS was based on Gary Kildall's CP/M, Paterson had bought a CP/M manual and used it as the basis to write his operating system in six weeks, QDOS was different enough from CP/M to be considered legal.
Microsoft bought the rights to QDOS for $50,000, keeping the IBM deal a secret from Seattle Computer Products.