When trying to install Windows 95 for the first time, PC users see a boring text interface without any graphics. It was true that DOS could "simulate graphics" with characters, but the Windows team decided to take a smarter approach by leveraging previously available code.

Raymond Chen, a Microsoft employee who has participated in the development of Windows for more than 30 years, has published a new article on his famous "OldNewThing" blog. The software programmer recently discussed again the Windows 95 installation and setup experience, a very complex project that uses three different operating system environments to accommodate a variety of usage scenarios on customer PCs.

Chen said Microsoft engineers could theoretically develop a graphics settings application because MS-DOS managed graphics well. However, DOS's method of handling graphics was very primitive and time-consuming. Prompt-based operating systems do not actively prevent images from being displayed on the screen, but programmers must implement all graphics functions manually.

Chen explained that MS-DOS did not provide any graphics primitives other than calling the BIOS to draw individual pixels. In any case, the BIOS-based approach is not ideal, since only direct access to the framebuffer (graphics card memory) provides minimal performance improvements for graphics operations. To sum up, the Windows95 installation team theoretically had to write their own graphics library from scratch.

And this is just the beginning. The minimum requirements for Windows 95 include a VGA graphics card, so the team didn't have to consider previous generations of graphics cards like CGA or EGA. The setup program had to display some dialog boxes, so the programmer had to write a new window manager that supported keyboard "tabs" between windows and hotkeys as quick shortcuts.

The setup must also support ideographic-based alphabets, such as Japanese and Chinese, while also managing simple animations. Chen said that all of this extra work had to be incorporated into the "basic" infrastructure required to boot a Windows 95 environment, with full support for extending/expanding memory via its own protected mode manager.

This leaves developers having to write a new operating system to boot with a Windows 95 setup, which is a waste of time since Microsoft is already selling products that are best suited for the job. Mr. Chen explained that the Windows 3.1 runtime used in the final version of the Windows 95 setup contained everything needed to "simulate graphics" under MS-DOS, and it was also fully debugged with its own video driver, graphics library, dialog manager, etc.

To this day, Microsoft still uses the same code loop; modern versions of Windows still require a "tiny" operating system to be installed to initiate the setup process. This minimal operating system environment is now the Windows Preinstallation Environment (Windows PE), and it is also used to (try and) repair Windows if there is a problem with the operating system itself.