The future that didn't happen

In 1990, Microsoft and IBM's strategic operating system for PCs was not DOS or even Windows, but OS/2. 34 years after its release, a box containing a pre-release version of the Microsoft OS/2 2.0 SDK suddenly turned up. Let's see what's inside and how it behaves after installation.

The first 16-bit OS/2, with extremely limited functionality, was originally released in 1987, but by the end of 1989, OS/2 1.2 introduced two major features: the Presentation Manager graphical interface (first introduced in OS/2 1.1) and the ability to install new HPFS file system.

OS/2 desktop

OS/2 desktop

Even before the initial release, Microsoft was talking about a special version of OS/2 for the 386 (Intel 80 386) with support for the 32-bit flat model API and improved DOS support using the 8086 (V86) 386 virtual mode.

In 1987, 386-based computers were few and far between. IBM wanted to have an operating system better than DOS now, not in a few years. At the same time, Microsoft had been working on “Advanced DOS” for several years, still 16-bit, but using protected mode 286. The result of this work was OS/2 1.x.

By 1990, the number of 386 and all-new 486 systems had increased. 386-specific software like memory managers (“LIMulators”) and DOS multitasking programs (including Microsoft's own Windows/386) became increasingly popular.

Just before the end of 1989, Microsoft released the first preview of the long-promised 32-bit OS/2 2.0, which was to be the first 32-bit PC operating system aimed at the mass market.

The company released Press release detailing the $2,600 OS/2 2.0 Software Development Kit (SDK).

Unfortunately, the preliminary version of OS/2 2.0, released in December 1989, has not survived to this day. But in June 1990, Microsoft released a second preview version of the OS/2 2.0 SDK. And this version was found after twenty years of searching and almost 34 years after its release!

OS/2 2.0 SDK 2 Preview Box

OS/2 2.0 SDK 2 Preview Box

The SDK sample came in the original, unopened box with documentation and everything.

Preview of OS/2 2.0 SDK 2 on 5.25

Preview of OS/2 2.0 SDK 2 on 5.25″ media

Here's what the pre-release version of OS/2 2.0 (also known as build 6.78), released in June 1990, looked like after installation:

OS/2 2.0 build 6.78

OS/2 2.0 build 6.78

It was terribly similar to its 16-bit contemporary – OS/2 1.2. The important thing was the absence of the DOS icon in the lower left corner (the only limited DOS window in OS/2 1.x, also known as the “DOS coffin”) and, more importantly, the appearance of the DOS Window and DOS Full Screen icons (DOS full screen) in the main group.

To put the pre-release version of OS/2 2.0 into perspective, it was released almost simultaneously with Windows 3.0, a year before DOS 5.0, almost two years before the release of OS/2 2.0, and more than three years before Windows NT 3.1.

Hybrid OS

The pre-release version of OS/2 2.0 from mid-1990 was very much a hybrid operating system. Device drivers were 16-bit, the Presentation Manager GUI was 16-bit, most utilities were 16-bit. But the kernel included a new 32-bit memory manager with paging support, support for 32-bit applications and, in particular, the MVDM subsystem – support for multiple DOS virtual machines.

Hybrid systems are generally the result of sound engineering practices. Why write new 32-bit code if the existing 16-bit code is fine? The reuse of large portions of OS/2 1.2 code undoubtedly sped up the development of OS/2 2.0.

One of the main goals of OS/2 2.0 was to run existing 16-bit OS/2 1.x applications. Therefore, it was logical to start with 16-bit code. Support for 16-bit device drivers also allowed existing drivers to be used with minimal changes rather than having to rewrite everything from scratch.

However, the developers of OS/2 2.0 hardly expected that so much 16-bit code would remain in OS/2 until the end.

Bugs and incompatibilities

After installing OS/2 build 6.78 (which went smoothly), I quickly discovered that DOS emulators simply didn't work. Any attempt to start a DOS session will result in a crash or, at best, a blank screen:

DOS emulators don't work

DOS emulators don't work

To OS/2 2.0's credit, crashing and recording the DOS session had no noticeable impact on system stability. This is an improvement over OS/2 1.x.

After studying the command traces, I discovered a very unexpected reason. In the DOSKRNL file (the DOS 4.0 kernel running inside DOS OS/2 modules), Microsoft tried to be sneaky and used an invalid instruction as a shortcut to access protected mode services. But there was a fatal problem: Microsoft was using the 0F 7F opcode, which is not undefined in the Pentium MMX and later – the MOVQ instruction. For this reason, running DOTS boxes in build 6.78 fails miserably on Pentium MMX and later Intel processors (with the possible exception of Pentium Pro).

Interestingly, the pre-release version of OS/2 2.0 (build 6.123), which arrived just a few months later, does not suffer from this problem. It uses the HLT instruction, which always causes a #GP error in V86 mode and works fine on modern processors. What prompted Microsoft to change this mechanism remains a mystery, because MMX processors were still a long way off.

I also found that I couldn't install the LAN Manager network components:

Something went wrong.  Try to guess why, it will be fun!

Something went wrong. Try to guess why, it will be fun!

The error message is terribly vague. After spending some time with the disassembler, I found the reason, again, very unexpected. The LAN Manager installation fails because NETAPI.DLL is found to be loaded.

For reasons that are completely unclear, Microsoft has included NETAPI.DLL on the LAN Manager drives, but also put another NETAPI.DLL as part of the base OS. If the print spooler finds NETAPI.DLL, it loads that exact file (and there is no obvious way to exit the print spooler). This breaks the network setup because it thinks that LAN Manager (or some other network software) is already installed.

The workaround was simple: boot OS/2 6.78 from the installation floppy (or from the OS/2 1.2/1.3 installation floppy), rename NETAPI.DLL in the \OS2\DLL directory, reboot. The print spooler simply doesn't use NETAPI.DLL if it doesn't find it, and the LAN Manager setup works. How Microsoft managed to release the preview version in this way remains a mystery – perhaps changes were made at the last minute.

Net

The OS/2 2.0 SDK came with four network support disks. It turned out that this was a preliminary version of LAN Manager 2.0 (SDK was released in June, LAN Manager 2.0 around November 1990). As of today, network support was new to the SDK, released in June 1990. The first OS/2 2.0 SDK, released in December 1989, did not include networking capabilities (maybe because LAN Manager 2.0 was not mature enough).

LAN Manager 2.0 Preview

LAN Manager 2.0 Preview

The installation program offers to install the LAN Manager server or a workstation with the Peer service (which is also a server). But, as far as I can tell, there are no server components on the disks. There is also no text-mode based user interface that is typically launched using the NET command.

Since the networking stack is based on LAN Manager 2.0, it only ships with NetBEUI (with the possible exception of some exotic XNS transports). There is no NetBIOS over TCP/IP and therefore no ability to communicate with modern servers.

But the preview version of the networking code can communicate with the LAN Manager 2.0 server and use file sharing. Fun times! It's a shame that IBM didn't include networking capabilities in OS/2 2.0.

For testing I used 3Com EtherLink II emulation in VirtualBox:

Time to make connections!

Time to make connections!

The OS/2 2.0 preview can easily see the LAN Manager 2.0 server (running on top of OS/2 1.2) running in another virtual machine:

OS/2 2.0 preview talks to LAN Man 2.0

OS/2 2.0 preview talks to LAN Man 2.0

You can also easily use a network drive and access remote files:

Using network resources

Using network resources

In general, the preliminary version of OS/2 2.0, surprisingly, included a functional network client, although stripped down. This would make software development much easier since files could be easily copied over a network.

Please note: It is not possible to install the released LAN Manager 2.0 or 2.1 client on OS/2 6.78. That is, the installer starts, but after that the system simply crashes, which is not surprising, given how tightly the network redirector was integrated into the operating system.

Development

Most of the OS/2 2.0 SDK was apparently a development kit. This included a preview of Microsoft's 32-bit C compiler, Microsoft Macro Assembler (MASM) with 32-bit support, as well as headers, libraries, and sample code. Plus. of course, electronic and printed documentation. Printed documentation was new in the SDK released in June 1990; the first release came with electronic documentation only.

CL386 and MASM386 ship with OS/2 2.0 SDK.

CL386 and MASM386 ship with OS/2 2.0 SDK.

The development kit was larger than the OS itself: 6 compiler disks and 5 tool disks versus 10 disks for the operating system itself.

The CL386 compiler is essentially the same compiler that was used to develop x86-based NT. Since about 1986, Microsoft had a compiler that produced 32-bit code for the 386 processor, and used it to develop the 386 XENIX; SCO supplied the said compiler for a number of years. The CL386 compiler was a variant of the compiler for DOS-like systems. It eventually evolved into Microsoft's 32-bit Visual C++ compiler, but users had to wait until 1993 before they could buy it.

And only the lucky few who bought the Microsoft OS/2 2.0 SDK could enjoy writing 32-bit applications a few years earlier, in 1990! The SDK comes with numerous sample programs and quite extensive documentation.

Electronic documentation existed in two different formats. OS/2 programming information, and especially Presentation Manager programming documentation, was supplied in native OS/2 help format:

OS/2 2.0 Application Development Guide

OS/2 2.0 Application Development Guide

Documentation for the compiler and assembler, as well as the OS/2 API, was in QuickHelp format:

QuickHelp Documentation for CL386

QuickHelp Documentation for CL386

There was some overlap and most of the documentation was available in both formats, but other parts were only available in one format or the other. It appears that the languages ​​group at Microsoft preferred QuickHelp, but the systems group and IBM preferred the OS/2 help format.

32-bit flat model

The OS/2 2.0 SDK introduced the 32-bit flat programming model, which became the standard in the 1990s. No more 64K segments, no more short-range and long-range pointers.

OS/2 2.0 took full advantage of the paging capabilities of the 386 processor. Virtual memory based on paging uniform 4 KB pages was easier to implement than variable-size segment paging as was the case with OS/2 1.x.

The SDK includes an excellent example demonstrating virtual memory in OS/2 2.0:

Example VMM in OS/2 2.0 SDK

Example VMM in OS/2 2.0 SDK

The 32-bit programming model was very different from what DOS and OS/2 1.x programmers were used to, but it was simple. For the most part, swapping was completely transparent and programmers didn't have to worry about it.

Just as importantly, the flat memory model made porting from other platforms much easier because it was similar to the programming model used by 32-bit UNIX platforms.

DOS emulation

DOS support in OS/2 6.78 seems quite functional and complete. The user interface for setting DOS properties was very different from the released OS/2 2.0, but the actual settings look familiar:

DOS emulator properties

DOS emulator properties

The big news, of course, was the ability to run DOS in a window:

DOS window in OS/2 6.78

DOS window in OS/2 6.78

Needless to say, OS/2 6.78 was capable of running multiple DOS systems simultaneously, both in windowed and full-screen mode, while OS/2 1.x could only dream of doing so.

Multiple DOS sessions in OS/2 6.78

Multiple DOS sessions in OS/2 6.78

It is very likely that Microsoft drew on experience with Windows/386 when developing the OS/2 MVDM subsystem, although the actual implementation was quite different and likely did not share much, if any, common code.

While it may not have made much sense, the development tools provided with the SDK could be run on a DOS system:

CL386 runs DOS

CL386 runs DOS

The 32-bit executable created by the SDK did not work under DOS, of course.

Judging by press reports, DOS support in the OS/2 2.0 SDK worked quite well even in the first release in December 1989. The June 1990 issue was undoubtedly even better.

What if…

The OS/2 2.0 6.78 build looks surprisingly stable and complete. The cover letter accompanying the SDK emphasized that Microsoft developers were using a preview version of OS/2 for their day-to-day work.

The minimalist hybrid approach allowed Microsoft and IBM to use the existing functional and stable operating system (OS/2 1.2) and supplement it with new important functions (32-bit applications, DOS applications).

Considering how far along OS/2 2.0 was in June 1990, it seems very plausible that the rift between Microsoft and IBM delayed the release of OS/2 2.0 by at least a year.

If Microsoft and IBM had released a 32-bit OS/2 with good DOS compatibility sometime in late 1990 or early 1991, it very likely would have prevented Windows 9x from happening, and we would have been using NT OS/2 instead of Windows NT. according to the original plan. But this future never happened.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *