As part of a collaboration with the Computer History Museum Microsoft has made the source code for early versions of MS-DOS and Word for Windows available to the public. Specifically MS DOS 1.1 and 2.0 and Microsoft Word for Windows 1.1a created in the 1980s.
Distinguished Microsoft engineer Roy Levin provided a bit of back-story on why MS-DOS was created:
In 1980, IBM approached Microsoft to work on a project code-named “Chess.” What followed was a significant milestone in the history of the personal computer. Microsoft, at the time, provided the BASIC language interpreter for IBM. However, they had other plans and asked Microsoft to create an operating system. Without their own on hand, Microsoft licensed an operating system from Seattle Computer Products which would become the foundation for PC-DOS and MS-DOS.
Microsoft had under 100 employees and a Microsoft product (MS-DOS) had less than 300KB (yes, kilobytes) of source code.
Following closely on the heels of MS DOS, Microsoft released the first DOS-based version of Microsoft Word in 1983, which was designed to be used with a mouse. However, it was the 1989 release of Word for Windows that became a blockbuster for the company and within four years it was generating over half the revenue of the worldwide word-processing market.
Bill Gates was interviewed by David Bunnell just after the launch of the IPM PC in the early 1980s for PC Magazine’s inaugural issue, and provided the backstory:
“For more than a year, 35 of Microsoft’s staff of 100 worked fulltime (and plenty of overtime) on the IBM project. Bulky packages containing computer gear and other goodies were air-expressed almost daily between the Boca Raton [IBM] laboratory and Seattle [Microsoft]. An electronic message system was established and there was almost always someone flying the arduous 4,000 mile commute.”
Source: Microsoft Blog