1. 18
  1.  

  2. 11

    I think this article gets a lot of important details wrong.

    In 1987, there’s Windows 2.0 and Windows/386. Windows 2.0 is fully real mode (although it can use expanded memory), and Windows/386 uses 386 capabilities to support multiple DOS sessions. The article is right about that.

    Windows/286 though is more an exercise in branding. It’s the brand applied to Windows 2.1, and it’s still a fully real mode system, and it cannot address 16Mb of RAM. One minor thing that happened between 2.0 and 2.1 was the availability of the high memory area, allowing the range between 1Mb to 1Mb+64Kb to be addressed in real mode. Doing that requires the A20 gate, which implies a 286, but it’s still real mode and the system works fine on an 8088.

    Both Windows/286 and Windows/386 operated the Windows environment itself in a 640Kb session, either because the system is natively real mode (286) or because it’s emulating many 640Kb DOS sessions and Windows happens to get one (386.) This still meant the Windows environment was constrained to 640Kb, although since it could use expanded memory, it was 640Kb that could be addressed with the ability to swap out regions into RAM that was not directly addressable. As a bonus trivia point, note that Windows/386 had no ability to page to disk, because the goal of the product was to use the RAM in the system.

    Windows 3.0 didn’t actually glob three different operating modes into one binary. There’s three binaries - KERNEL.EXE, DOSX.EXE, and WIN386.EXE (for real mode, standard mode, and 386 enhanced mode respectively), and a stub WIN.COM which launches the right one. But the important thing is that the 286 and 386 modes allowed the Windows environment to run in protected mode and for Windows programs to address more than 640Kb. This is why those systems will warn before running a 2.x application, because there’s no guarantee that a program designed for real mode will run in protected mode. The main reason for including the real mode environment wasn’t to support 8088, it was to support 2.x applications until they could be updated to run in protected mode.

    The observation I make about these systems is that OS/2 1.x was a 286 protected mode environment, so each OS/2 application could address all of the RAM in the system but there could only be one DOS session due to no v86 support; Windows/386 was protected mode host running many real mode environments, so it could run many DOS sessions, but the Windows part was also limited to 640Kb. The next generation (Windows 3.0, OS/2 2.0) allowed the full set of capabilities to support multiple DOS sessions and allow protected mode applications.

    1. 2

      The other things missed is that the EGA/VGA driver in Windows/386 can run CGA programs in a windows. My go to test is Battletech in CGA mode.

      I’d shown it off here: https://virtuallyfun.com/wordpress/2018/08/07/windows-386-v2-03/

      The other big thing is that Windows/286 can run multiple text mode MS-DOS sessions in windows. Memory is greatly constrained, and they need to be very well behaved, infocom games fit the bill and you can play several at once, in dosboxes in a windows.

      Windows/286 delivers the European MS-DOS 4 experience, in the same way that Windows/386 delivered v86. Although being basically constrained to 64kb or less per session isn’t terribly useful, unlesss you are back in the 80s

      1. 1

        Oh, now those are very cool additions! Thank you!

        I knew that ordinary Windows 2 could multitask DOS boxes, yes, but as you say, since they all had to fit into the same 640kB along with Windows itself, this wasn’t actually very useful. I’d also seen that if you had a full-screen graphics program running and you forced it into a window (Alt-Enter?), in some modes, Windows could display an accurate snapshot of it. I did not know CGA stuff could continue running.

        I am European but I never saw the multitasking “original DOS 4”. I did find it interesting that for me and my customers, one of the more useful additions to MS-DOS 4 and 5, DOSShell, never got the credit it deserved IMHO. Before DOSShell, either I lashed together app menus with batch files, or if the customer spent a bit more, there were dozens of little DOS menu tools you could use. DOSShell built a pretty decent one right in, with a decent file manager, but few ever mentioned that it also gave you task switching. You could be in Quattro or dBase or Word or whatever, summon the shell with the Ctrl+Shift+Esc, then launch another app, and your original app was suspended right where it was.

        It wasn’t multitasking but it was all some DOS power-users needed. I can’t remember if background apps were paged out into XMS or EMS or something, or snapshotted to disk.

        1. 3

          European dos 4 was for OEMs it wasn’t retail. It’s basically the Windows memory management engine combined with DOS. It’s almost a real mode OS/2. It would have been super useful except it needing to fit the whole thing in real mode. Oddly enough DOS4G/W can run under it so it’ll run retail DooM.

          Windows 2 had the best compromises they could do with real mode. Obviously the 386 product was really a hypervisor with a real mode UI which really made it far nicer for dos multitasking. Enough of it fits with dos onto a single floppy so it was my go to for emergency stuff as at least I could run more than one thing at once …

          There is a leak of a super early Windows 3.0 that looks like 2.0 but it’s running in protected mode. It’s night and day ahead of 2.0 since it’s got tonnes of memory, but they restricted it to 286 protected mode so no v86 mode and EGA only.

          This was such a crazy time at MS as they ended up jumping on the NT/OS2 project dumping the OS/2 developers and switching to Windows everywhere for NT just as 3.0 was a massive big seller (it sold well over a million units!) far more than OS/2 ever did in its lifetime, along with not selling 3,000$ SDK’s they dropped the bar to $99 for Quick C for Windows and Visual Basic 1.0. Now the “bedroom coder” had access to a DOS Extender, and dev kit for a few hundred, far cheaper than anything else on the market.

          The real silly was how expensive tools and extenders were let alone audio libraries and graphics. Windows crush them all even back in the era of GDI only.

          1. 1

            Great comments - thank you, I am learning a lot here!

            I have done a few blog posts on the theme of “great might-have-beens of tech”, and one was on the multitasking DOS revolution that never quite happened. I focussed on DR-DOS 7, which finally re-introdruced multitasking, and DESQview/X. I had not considered that the original, pre-IBM-PC DOS 4, MS-DOS 4 could have touched it all off.

            I’ve not seen this leaked Win3. I’ll have a look.

            The OS/2-Win3-NT thing was a road-crash. It is really quite surprising anything useful came out of it, really.

            I evaluated OS/2 1.x for my then-employers and told them to keep clear. Over 30Y later, I stand by that. It was not a compelling option. A 386 OS/2 1.0 that still ran in text mode but could have multitasked DOS apps would have been a totally different proposition, and the line that MS tried to sell IBM, of OS/2 for the high end and Windows for the low end, could have kinda-sorta worked.

            By the time OS/2 2 was a thing, the 386SX was out and common. That’s what I mostly ran it on. But when OS/2 1.x was current, the 386DX was the state of the art, and 386DX PCs were expensive beasts. 4MB or more of RAM was reasonable, so a 386 OS/2 1.x for £5000+ PCs and a protect-mode 286 Windows 3 for £1000-£2000 PCs might have made some sort of sense.

            But it wasn’t real and in the real world MS was wisely extricating itself from a sinking ship and this was the fraudulent justification. For once, I don’t blame the company.

            It’s widely forgotten that NT was a successful salvage of the original OS/2 3.x, the planned CPU-portable version. So NT is the exception that proves (violates) the second-system-effect rule. I ran OS/2 2 and I liked it, but the Workplace Shell really was not all that, and the vast config text files were horrible to deal with. NT and the much-maligned Windows Registry were better.

      2. 1

        Fascinating answer – thank you!

        Re Windows/286… I am not sure. You might be right. I have done some digging and there is a statement from Microsoft’s own “Old New Thing” blog that Standard Mode goes back to Windows/286: https://devblogs.microsoft.com/oldnewthing/20040407-00/?p=39893

        However, several other sources state that Windows/286 ran fine on an 8086, just without HIMEM.SYS and without access to the High Memory Area. These seem to be contradictory statements. I am not sure which is true, or how to find out apart from maybe getting a copy and trying it – but I’m not sure any Windows 2-era software could tell me how much free RAM there was.

        They may not truly be contradictory though – if the memory manager could initialise and use XMS, but the programs were real mode binaries, that might make both statements valid, no?

        Note that the OS2Museum says that Windows/386 can run in real mode, too: http://www.os2museum.com/wp/windows386-2-01/

        There were multiple releases of Windows 2: at least 2.0, 2.01, 2.03, 2.1 and 2.11. It is not entirely clear to me but it seems that Windows 2.0 was marketed in two editions, called “Windows 2” and “Windows/386”. For Windows 2.1x this was changed to “Windows/286” and “Windows/386”.

        Example: https://www.oldcomputermuseum.com/os/windows_286_v2.10.html

        I concede your point about there being 3 different kernels in Windows 3.0, with WIN.COM choosing between them.

        Regarding OS/2 1 for 386, I don’t know if you have seen but the OS/2 Museum has a copy: https://www.os2museum.com/wp/playing-football/

        It so nearly happened.

        Things might have played out quite differently… OS/2 1 on 386, leading to quicker obsolescence for 286 PCs, but leaving a gap for DOS GUIs that Quarterdeck could have filled with DESQview/X. Perhaps with this competitive spur, the GNU Project would have adopted the BSD 4.4-Lite kernel that it evaluated; there could have been a working GNU OS by 1989 or so.

        1. 5

          there is a statement from Microsoft’s own “Old New Thing” blog that Standard Mode goes back to Windows/286:

          Yeah, I remember back at the time telling Raymond he was wrong about that, which he conceded. Unfortunately since the blog keeps migrating across systems without preserving comments, all of that discussion was lost. I wasn’t the only one to comment.

          how to find out apart from maybe getting a copy and trying it

          You should try it :) Note that Windows 2.x really needs setver to tell it that it’s DOS 3.40, and Windows/386 requires DOS to be not loaded as high, since it predated that support. I’ve never been able to get Windows/386 to work outside of real DOS though (ie., not DosBox.)

          I’m not sure any Windows 2-era software could tell me how much free RAM there was

          Since these systems tended to run out of RAM a lot, they made it obvious: in the about box in MS-DOS Executive. Windows/286 reports this as “Memory Free.” If EMS is present, including on Windows/386, it reports “Conventional Memory Free” and “Expanded Memory Free”. Even Word and Excel include this information in their About boxes.

          if the memory manager could initialise and use XMS, but the programs were real mode binaries, that might make both statements valid, no?

          I haven’t dug into the code, but strongly suspect that WIN386 morphed into EMM386. Both are using the remapping capabilities of the 386 to expose XMS as EMS, which the Windows environment can consume. If you didn’t need multiple DOS boxes, EMM386 + Windows/286 is functionally the same as Windows/386; it’s just that Windows/386 could also leverage the same remapping logic for multiple DOS boxes (and video grabbing.) One other quirk is that the EMM386 code is just newer and more capable, so trying this out now, Windows/386 only emulated 15Mb of EMS, but EMM386 emulated 32Mb on the same hardware.

          OS2Museum says that Windows/386 can run in real mode, too

          Yes, it can. I bought a copy on eBay before that post was written, and was quite surprised to see Win386.exe + Win86.com. It doesn’t do the auto-detect logic that 3.0 does, but there’s really no good reason to use Windows/286 if you have access to Windows/386 since it’s basically a superset. Presumably back then it cost a lot more.

          Actually, I just tried something: you can copy win386.exe and win386.386, place them in a Windows/286 install and run it. Win386 tries to load win86.com, but the existing win.com can be renamed to win86.com. Or, you can just take command.com and call it win86.com to really inspect what win386.exe did: it’s a 10Kb TSR that emulates 16Mb of EMS and launched a child program. I’ll bet that TSR exposes some really funky services too that probably allow for multiple DOS sessions with no Windows environment at all, but I’ll need some time with a debugger to see what it does. (Edit: One other thing it does that I hadn’t noticed is it’s using ~300Kb of EMS, so it’s more than 10Kb total. EMM386.EXE detects WIN386 as its device driver and can interact with it but can’t disable EMS because WIN386 is using it.)

          Regarding OS/2 1 for 386, I don’t know if you have seen

          Heh, I hadn’t seen that, it’s very funny. I thought at the time a lot of the more technical folks (including BillG) thought that 286-based OS/2 was a bad idea, but it was driven by IBM’s business interests in having sold and still selling so many 286s much later than other manufacturers.

          Since we’re on topic though, have you seen WLO? That thing was really technically impressive, because the binaries were compatible between Windows 3.0 and OS/2 1.x - the exact same program ran in protected mode on both. OS/2 1.x and Windows used the same “NE” executable format, and WLO was a Windows program with a bit set in the header telling OS/2 to load it, coupled with some shim DLLs to redirect Windows API calls into their OS/2 equivalents. It was used in Excel and Word for OS/2.

          1. 5

            Unfortunately since the blog keeps migrating across systems without preserving comments, all of that discussion was lost.

            Wayback and some URL spelunking to the rescue.

            1. 4

              Thanks for digging this up. To be clear, I’m not Mike; I emailed Raymond privately, but Mike’s description is better than mine.

              At the end of the comments, the thing they’re talking about is WINMEM32.DLL. That beast deserves an article all of its own; the issue is that Windows 3.x runs in protected mode so can address all of the memory, but it’s still a system designed for a 286. The 386 processor introduces “flat” 32 bit registers, but those can’t be used to interact with the Windows 3.x API, which expects all far pointers in 16:16 format, since that’s what the 286 could support. WINMEM32.DLL allowed for conversion between these formats to facilitate running 16:32 code that could still interact with Windows. Note that doing this is challenging because it can’t just be the output of a 32 bit compiler - it’s an executable that has pieces of code running in 16:16 and pieces running in 16:32, and requires a fair amount of handwritten assembly. I don’t think I ever saw a program use this DLL, since it didn’t enable access to additional memory and didn’t simplify development. Win32s arrived around 3 years later but it allows a 32 bit program to use a 32 bit API and let Windows do the thunking, so the development model is much simpler.

              1. 1

                Good find! Thanks!

              2. 4

                I haven’t dug into the code, but strongly suspect that WIN386 morphed into EMM386

                Fun fact: The PC98 version of MS-DOS includes a DPMI DOS extender - which is actually just a headless version of 386 enhanced Windows 3.1.

          2. 3

            The new 80386 chip had an additional mode on top of 8-bit (8086-compatible) and 16-bit (80286-compatible) modes.

            Wait, 8086 is a “8 bit” CPU? (hint: No, it isn’t. Not the ALU width, not the register width, not the data bus width and not the address bus width)

            Article needs to be reviewed from top to bottom for factual mistakes. There’s far too many. As it is, you’ve made us your peer-reviewers.

            1. 3

              OK, then, what alternative nomenclature do you propose to distinguish between the 1st, 2nd and 3rd generation x86 CPUs? The 286 is unambiguously 16-bit and nothing else. The 386DX is unambiguously 32-bit, but the later 386SX muddies the waters.

              If the 2nd-gen 286 is 16-bit, then I submit that the far-more-limited 8088/8086 are at best 8/16-bit designs, with their 8-bit-like segments – just a bunch of them. The 8086 was expressly designed to be compatible with 8080 assembly code, and the 8088 had an 8-bit memory bus.

              For simplicity and brevity, I think comparing them to the later model with 16x as much RAM support by calling them 8-bit for short is fair. Clearly you disagree. That’s fair, too. I am surprised by how vociferously, though.

              Article needs to be reviewed from top to bottom for factual mistakes. There’s far too many. As it is, you’ve made us your peer-reviewers.

              I think that’s unecessarily harsh. It’s just a blog-post stuck together from a few FB comments. It’s not something I am trying to sell to anyone.

              1. 1

                For simplicity and brevity, I think comparing them to the later model with 16x as much RAM support by calling them 8-bit for short is fair.

                Fair? How about being accurate instead?

                1. 1

                  So let me get this straight: for believing what Microsoft said about its own product, I am in your view intentionally spreading disinformation?

                  Anyone else reading this: tell me, is it possible to block someone on Lobsters?

                  1. 1

                    for believing what Microsoft said about its own product

                    This is interesting. Can you provide a link?

                    Anyone else reading this: tell me, is it possible to block someone on Lobsters?

                    Please also tell me, while at it.

                    1. 7

                      Guys, please chill. None of us can always be right, and none of us were born knowing everything. Being welcoming, supportive and open in the face of inaccuracies is how we all grow.