Microsoft Word for Windows Version 1.1a Source Code

Software Gems: The Computer History Museum Historical Source Code Series

The dominant word processing program for personal computers in the 1980s was DOS-based WordPerfect. Microsoft Word for DOS, which had been released in 1983, was an also-ran.

That situation changed dramatically with the introduction of Microsoft Word for Windows in 1989.  By 1993 it was generating 50% of the word processing market revenue, and by 1997 it was up to 90%. [1]

word_processor_market_share

Clearly there was something extraordinary about Word for Windows. Part of its success was due to Microsoft’s marketing acumen. But it was also a stunning technical achievement, and its ability to run on ordinary PCs created the first popular vanguard of the new graphics-oriented style of document preparation.

Remember, this was a time when a typical personal computer might have an 8 Mhz processor, 1 megabyte of memory, a 20 megabyte hard disk, and a floppy disk drive. How did Word accomplish so much with so little?

There’s only one way to understand the magic in detail: read the code. With the permission of Microsoft Corporation, the Computer History Museum is pleased to make available, for non-commercial use, the source code of Word for Windows version 1.1a as it was on January 10, 1991. This material is © Copyright by Microsoft.

The 7 MB zip file contains 1021 files in 33 folders. In the root directory there is a “readme” file that briefly explains the rest of the contents. Most of it is source code in C, but there are also text documents, x86 assembler-language source files, executable tools, batch files, and more.

To access this material you must agree to the terms of the license displayed here, which permits only non-commercial use and does not give you the right to license it to third parties by posting copies elsewhere on the web.

Download Microsoft Word for Windows Version 1.1a Source Code

Other historical source code releases in this series include IBM’s APL programming language, Apple II DOS, Adobe’s Photoshop, Apple Macpaint/QuickDraw, and Microsoft’s MSDOS.  If you would like us to do more of this, please consider supporting the museum’s efforts by making a donation. We are a 501(c)3 non-profit organization.

 

How Microsoft Word Came To Be

In the dark ages of computer word processing, what you wrote (and saw on the screen, if you had one) was cryptic formatting commands embedded within the text, like this:

.nf
.ll 4.0i
.in 2.0i
101 Main Street
Morristown, NJ  07960
15 March, 1997
.sp 1i
.in 0
Dear Sir,
.fi
.ti 0.25i
I just wanted to drop you a note to thank you…

 

After “compiling” and printing, you finally saw the result – which often wasn’t what you wanted. Make changes. Try again.

The emergence of WYSIWYG (“What You See Is What You Get”) word processors changed all that. The screen showed what the final document would look like, and keyboard commands you used changed the look of the text, not a programming script.

Charles Simonyi at Xerox PARC in 1980

Charles Simonyi at Xerox PARC in 1980

One of the first such programs was BRAVO, created in 1974 by Butler Lampson, Charles Simonyi and others at Xerox PARC, the Palo Alto Research Center, for the groundbreaking Alto computer. Simonyi later said,

 ”It was clear that quite a beautiful editor could be written for the Alto. Remember, the Alto had a black and white bitmap display. It had a mouse. It had an un-decoded keyboard. It had all the ingredients that are necessary for WYSIWYG. And, of course, then the network came around. The laser printer was coming alive. So all the components were there, except for the software…. We set out to write an editor and we finished it about three months.”[2]

Like much of the other innovative Alto software and hardware, BRAVO was never sold as a commercial product.

After nine years, Simonyi was frustrated by Xerox’s inability to turn great ideas into products. “I lost faith in Xerox’s ability to do anything”[3] . In 1981 he left and joined Microsoft to lead a team in creating application programs. The first, already in progress when he arrived, was the spreadsheet Multiplan, a VisiCalc competitor.

Simonyi was well-suited from his Xerox experience for the next assault on the competition: to unseat MicroPro’s popular WordStar word processor. He hired Richard Brodie, a brilliant programmer he had first hired in 1979 at PARC. The fact that Brodie had no college degree wasn’t an issue; Brodie said later that “He asked me some programming questions and he liked the way I answered them.”[4]

In the summer of 1982 Brodie began working with others at Microsoft on a word processor to be controlled by a mouse. It was finished just over a year later, in October 1983. “I had pretty much a free hand. It was a pretty small program, and I was familiar with word processing from my work at Xerox PARC with Charles.”[5]

It may have been a “small program” but it had some sophisticated features, including support for style sheets, multiple windows, footnotes, mail-merge, undo, and the proportional fonts that the newly emerging laser printers would be able to use. Microsoft founder and president Bill Gates was impressed. “One thing that just blew Bill away was an optimization of the display speed. We actually formatted as you typed. Every time you inserted one character, the screen would update to show exactly what was going to be printed.”[6]

Free demonstration copies of Microsoft Word for MS-DOS were bundled with the November 1983 issue of PC World magazine. But it received mixed reviews, in large part because it was so different from what most people were used to. The 1984 BYTE magazine review said it was “clever, put together well, and performs some extraordinary feats” but “extremely frustrating to learn and operate efficiently. …Word’s developers seem to be trying to completely reinvent word processing.”[7]

That is precisely what they were trying to do. Although it was inspired by the earlier work at Xerox, few people outside the research community had been yet exposed to the new regime that would eventually predominate. Microsoft Word brought WYSIWYG to the masses.

Over the next years Word was continually improved. The first version for Microsoft Windows was released in late 1989 at a single-user price of $495. It received a glowing review in Inforworld [8] that didn’t flinch at the price: “If your system is powerful enough to support Microsoft Windows, at $495 it is an excellent value.”

 

word_for_windows_1.1a_2Version 1.1a, whose source code we are making available here, was released the next year. Microsoft Word For Windows had started its remarkable climb to 90% market share.

Acknowledgement

We are grateful to Roy Levin, Managing Director of Microsoft Research, Silicon Valley, for working hard to find the source code and getting permission for us to release it.

References

[1] Stan Liebowitz and Stephen Margolis, “Winners, Losers, and Microsoft: Competition and Antitrust in High Technology”, Independent Institute, 2001

[2] Oral history interview of Charles Simonyi by Grady Booch, February 6, 2008, http://www.computerhistory.org/collections/catalog/102702232

[3] Quoted in James Wallace and Jim Erikson,  “Hard Drive: Bill Gates and the Making of the Microsoft Empire”,  HarperBusiness 1992, p 219

[4] Quoted in Cheryl Tsang, “Microsoft; First Generation”, Wiley & Sons, 2000, p 52.

[5] Ibid, p. 57

[6] Ibid, p. 58

[7] Janet Cameron, “Word Processing Revisited”, BYTE Guide to the IBM PC, Fall 1984, p 171 <Pages from 1984_09_BYTE>

[8] ”Welcome Microsoft Word in A New Version for Windows”, by John Lombardi, Infoworld, January 15, 1990, pps. 78-80 <Infoworld_1990-01-15_MicrosoftWordWindows10>

 

ABOUT LEN SHUSTEK

Len Shustek is chairman of the board of trustees of the Computer History Museum. In 1979, he co-founded Nestar Systems, an early developer of networks for personal computers. In 1986, he co-founded Network General, a manufacturer of network analysis tools including The Sniffer™. The company became Network Associates after merging with McAfee Associates and PGP. More ...

  • http://www.songtrellis.com David Luebbert

    It’s exciting to be able to view these sources after so many years. I worked as a software developer on the Win Word 1.0 project for the final 9 months of the effort.

    I find that I still remember how a lot of this code goes, and remember a lot of the considerations that went went into its design and development.

    This code’s heritage reaches back to Windows Write running on Windows 2.0 and to Macintosh Word 3.0.

    The developers who were the nucleus of the Opus project that wrote Win Word 1.0, first worked on the team that shipped Windows Write in December 1987 for release as part of Windows 2.0.

    The Write project started in 1985, if I remember correctly. During its course, its members figured out how to write a rudimental word processor using the Windows architecture. Absolutely key for what followed.

    The foundation of word processing primitive routines that Win Word 1.0 was built upon (format, display, edit, property management, file format, open, save, style sheet, selection,cursor keys, character insertion, headers and footers, footnotes, outlines, formulas, RTF, page layout, print, action routines that responded to dialogs) were first written for the Mac Word 3.0 project and then directly ported into the Win Word 1.0 source tree.

    Support for the WYSIWYG table editing that was created for Mac Word 4.0 was grafted into the Opus project shortly before Mac Word 4 was ready to ship.

    The data structures that Simonyi designed for Mac Word 3.0, were present with small modifications in Win Word 1.0, and lots of the code for Win Word was directly modeled on designs that were proven when Mac Word 3.0 and 4.0 shipped.

    I don’t think it’s been noted yet, but this Win Word release contains a significant portion of Mac Word 4.0 within it (the contents of the wordtech directory). That code was compiled by both the Mac Word 4.0 and Win Word 1.0 build processes.

    This code and design inheritance from Mac Word constituted a nearly seven year head start (1983 through 1990) on the process of adapting a word processor to a graphical windowing system, before Word Perfect finally joined the competition to launch the best word processor on Windows, after Windows 3.1 shipped.

    I count 1983 as the start of the head start because that was when the port of PC Word 1.0 code started that finally shipped as Mac Word 1.0 in 1985, and lessons started to be learned about the best way to design word processors that ran on personal computer windowing systems.

    Despite it’s Mac Word heritage, an amazing volume of heavy lifting and tooling was done inside of the Opus project, creating technology that only shipped once Win Word was ready to go. Win Word was the first Microsoft word processor that provided document templates that eased the creation of multifarious types of documents. The Win Word team invented fields (50-some types), which made it possible to do automatic production and maintenance of cross-references, table of contents, indexes, figure numbering, etc as the user typed.

    Win Word was the first version to do revision marking, annotations, bookmarks, and to use DDE to accept data from other applications or send Word data to those apps. I think it was the first to do hyphenations automagically.

    Most excitingly, Win Word 1.0 was the first Word that provided its own macro language, WordBasic, that under program control had access to every capability in Word that could affect the content or format of a Word document. Wiring Win Word to respond to the control of every command sent from Word Basic and to send the correct results back in all cases under the memory constraints imposed by late 1980′s PCs was a massive undertaking.

    Cashmere was the name that was applied to the Win Word project as it was being specified by Richard Brodie and Word’s corps of program managers. I think the idea was that this word processor for Windows was designed to give customers a luxurious, fully appointed, everything thought out, well-cared for, comfortable feeling as they used it, like a Cashmere sweater.

    I could be all wet though on this point though ;-).

    The name Cashmere also refers to two sites in Washington state. Cashmere Mountain that looks down on the north edge of the Enchantment Lakes Wilderness in the Central Cascades and Cashmere, WA, which is a fruit growing town along the Wenatchee River in a picturesque setting that you pass as you descend from Leavenworth below the east face of the Cascades to Wenatchee on the Columbia River. I’m not sure of any connotation of these places that would recommend either as a namesake for a software project.

    At a certain moment that I didn’t track that well, since I was working on Mac Word versions at the time, Win Word became the Opus project, I suppose because there was hope it would become the magnum opus, the great work, for those of us who worked on the Microsoft word processors.

    There may have been a bit of sly humor also going on also, because Berke Breathed’s penguin Opus, from the Bloom County and Outland comic strips was chosen as project’s mascot by the engineers. A touch of self-doubt and worry about the magnitude of the task ahead may have caused the engineers to choose a flightless, albeit extremely witty and resourceful bird as their figurehead.

    The project lasted so long that I think many of us wondered, in dark moments, whether it would ever be able to take off and climb towards the sky.

    There were many great software engineers and managers that finally figured out how to make Win Word 1.0 the success that it became. I think we’re very proud that a product that did turn out to be one of our great works has been become available for study through the auspices of CHM.

  • http://www.songtrellis.com David Luebbert

    The Post-Mortem document for the Win Word 1.0 project was found during discovery and was made public as an exhibit as part of the public record of the class action lawsuit Comes v. Microsoft that was filed in the State of Iowa in 2003, which “sought more than $330 million and alleged that Microsoft engaged in monopolistic and anti-competitive conduct which caused customers to pay far more for software than they would have if there had been competition”.

    “In February 2007, after seven years of litigation – including three trips to the Iowa Supreme Court and three months of trial – the parties reached a settlement under which Microsoft will provide up to $179.95 million in cash and vouchers to members of the Iowa class.” (from the plaintiffs attorneys: http://www.zelle.com/news-updates-13.html)

    Why was the Win Word 1.0 postmortem brought into evidence as an exhibit in the trial?

    The plaintiffs attorney’s were trying to make a case that Microsoft applications development teams derived competitive benefit from communications with engineers in the Windows group before outside parties could submit their own queries to those same resources.

    The post-mortem document included a section that evaluated the Win Word teams interactions with the Windows Development group.

    http://antitrust.slated.org/www.iowaconsumercase.org/011607/8000/PX08875.pdf

    This post-mortem document, written by Peter Jackson who was the final development lead for the project, was extremely detailed and comprehensive. The entire development timeline of the project is recorded there, including the roster of engineers who contributed and their responsibilities on the project and their period of participation,

    It’s existence will be of great assistance to those who try to understand how Win Word came to be.

  • Len Shustek

    David, thank you for your recollections! They are wonderful additions to the historical record. We knew there was a strong influence of Mac Word on Win Word, but you have given us much additional detail and color on that and other topics.

  • http://www.songtrellis.com David Luebbert

    A lot of the editing flexibility and speed that all versions of Word exhibit is due to the use of a piece table data structure to represent the editing state of a document.

    In a web post “What’s been wrought using the Piece Table?”, which I wrote in response to the publication of the Win Word sources, I described the way that Word used piece tables, mentioned the genesis of the idea, and observed that the subject of piece tables had thus far garnered only a two line mention in Wikipedia that was too sketchy to really understand:

    http://1017.songtrellisopml.com/whatsBeenWroughtUsingPieceTables

    In the comments for that article I describe how Word’s implementation differed from similar ideas that have been documented in Comp Sci literature:

    http://1017.songtrellisopml.com/whatsBeenWroughtUsingPieceTables#comment-1331972323

    Here’s a link to a reddit r/programmer’s discussion that was prompted by the posting of my article:

    http://www.reddit.com/r/programming/comments/22fpz0/whats_been_wrought_using_the_piece_table_how/

    Also in the comments of my Piece table posting, I wrote about a Word 97 development that stood upon Word’s piece table underpinnings:

    http://1017.songtrellisopml.com/whatsBeenWroughtUsingPieceTables#comment-1323223998

  • http://www.songtrellis.com David Luebbert

    Writing in outline form, I’ve written a guide that describes many of the data objects that were important to the operation of Win Word 1.1. called Inside Microsoft Word.

    99% of the data object tags that were used in Win Word 1.0 and it’s predecessors, PC Word 1.0, Mac Word 1.0, and Mac Word 3.0, were two, three or four characters long, following the tenets of the Hungarian Notation, which discouraged the use of long names for data entities in a system.

    The usual rule was that 2 character tags named entities that were used widely throughout the system, of great importance (eg. the CP, a character position, was of great importance in Word’s algorithms and was widely used).

    Two character tags were frequently pronounced by spelling out their letters.

    Tags of character length 3 named important entities but these were not likely to be widely referenced throughout the system. (eg. a PCD, a piece description, was mostly referenced only within modules that performed editing operations).

    Not a hard and fast rule, sometimes universally used tags like DOC, the document number used to identify open documents throughout the system, were given a three character tag to increase the likelihood that it would be pronounceable.

    Four character tags were usually given to data objects whose usage within the system were fairly narrow and subsidiary.

    Why the emphasis on using short object tags in Hungarian?

    It was somewhat likely that tags would be composed in useful ways, which would combine tags in different patterns. (eg. mpdochdod was an array that mapped an integer document ID, the DOC, into a handle that could be used to access its document description, the DOD)

    Also, it was thought that use of large names made it more difficult to describe, discuss, and remember how to speak about, important data objects in the system. Word data tag names became the short hand lingo that the software developers of the project used to discuss their work.

    This document is about 2/3rds complete at this moment. I hope to complete it in a few days time.

    Despite it’s incompleteness, I thought it might be best to publicize this outline now, to provide immediate guidance to those who are trying to make sense of the sources.

    When it’s finished, I’ll email the final copy to the museum.

  • http://www.songtrellis.com David Luebbert

    Hungarian Notation, invented by Charles Simonyi, was a method for naming all of the data entities and procedures that were used in a software development projects.

    All of the applications that were produced under Simonyi’s supervision by Microsoft’s Applications Division in the 1980′s and early 1990′s, were written using Hungarian.

    Since it’s difficult to read the Win Word 1.1 sources without understanding how Hungarian Notation worked, I’m providing a link to this Hungarian Notation guide.

    This document is substantially complete, but requires a small amount of additional editing.

    I’ll email a copy to the museum, when it’s completed.

  • http://www.songtrellis.com David Luebbert

    People who were exposed to Hungarian Notation, who were not properly indoctrinated in its use, frequently complained that the names that were composed using its rules were not pronounceable.

    English pronunciation rules usually would not help one parse a long Hungarian definition when several data object tags had been composed together into a longer name.

    A short tag that lacked vowels might be spelled out when it was read and spoken. Otherwise, a convenient vowel sound might be placed between letters of a solidly consonantal tag to make it pronounceable.

    Hungarian tags and their prefixes and suffixes were shortcuts that could be used by those who were conversant with the practices of a particular development group.

    At the same time, all of those shortcuts could easily be expanded into a multi-word accurate description of a structure or procedure for the benefit of neophytes who did not yet understand the project’s conventions.

    I do remember participating in a discussion with Simonyi and Richard Brodie early in my Microsoft career, where Hungarian’s were flung about in the conversation so quickly, I wasn’t always sure what they were talking about despite the fact that I was looking at the same listed code that was the subject of Charles and Richard’s conversation.

    It was like listening to rapid-fire conversational French, at a time when you’d just mastered rudimentary vocabulary.

    I remember it usually took new recruits about a month or two to become reasonably fluent in speaking about code using the notation. Since it was just a limited notation, it was far easier to learn to express your ideas using it than it was to learn an actual language.

    To help folks parse, make sense of, and speak about code that uses Hungarian Notation names, especially the Win Word 1.1 source code, I’m linking to this Guide to the Pronunciation of Hungarian Notation Tags.