Most of us are aware that IBM’s OS/2 has excellent compatibility with DOS and Windows 3.x programs, to the point where OS/2 just ships with an entire installation of Windows 3.x built-in that you can run multiple instances of. In fact, to this day, ArcaOS, the current incarnation of the maintained and slightly modernised OS/2 codebase, still comes with an entire copy of Windows 3.x, making ArcaOS one of the very best ways to run DOS and Windows 3.x programs on a modern machine, without resorting to VMware or VirtualBox.
Peter Hofmann took a look at one of the earlier versions of OS/2 – version 2.1 from 1993 – to see how its DOS compatibility actually works, or more specifically, the feature “DOS from drive A:”.
You can insert a bootable DOS floppy and then run that DOS in a new window.
Since this is called “DOS from drive A:”, surely this is something DOS-specific, right? Maybe only supports MS-DOS or even only PC DOS?
Far from it, apparently.
↫ Peter Hofmann
Hofmann wrote a little test program using nothing but BIOS system calls, meaning it doesn’t use any DOS system calls. This “real mode BIOS program” can run from the bootsector, if you wanted to, so after combining his test program with a floppy disk boot record, you end up with a bootable floppy that runs the test program, for instance in QEMU. After a bit of work, the test program on the bootable floppy will work just fine using OS/2’s “DOS from drive A:” feature, even though it shouldn’t.
What this seems to imply is that this functionality in OS/2 2.1 looks a lot like a hypervisor, or as Hofmann puts it, “basically a builtin QEMU that anybody with a 386 could use”. That’s pretty advanced for the time, and raises a whole bunch of questions about just how much you can do with this.
Well I’ll be damned!
Someone watched some The Phintage Collector videos on Youtube… lol
IBM OS/2’s MVDM is very advanced. Not a virtual machine nor a hypervisor type 2 but almost. SCO Merge and MS Win95’s Command Prompt don’t come close to its list of features.
Since OS/2 was made to be the successor to MSDOS, it used DOS apps like they were native apps without any troubles. It still suffered from few DOS programmes (mostly games) that did nasty stuff with the hardware. But on the whole, it ran like a charm. Boot from Block devices. And lots of virtualized device drivers (mouse, himem, networking, etc…)
The original Intel 286/386 CPUs were designed with this sort of thing in mind, since all software at the time was real mode. Although they supported protected mode for the OS, they allowed the CPU to also be run an a virtual real mode, allowing the OS to run legacy real-mode programs without the OS giving up protected mode.
The 286 didn’t have that capability, only the 386 onward. In fact, 286 was considered “brain-dead” due to the fact that, officially, it wasn’t possible to return to real mode after having changed to protected mode (OS/2 and others used tricks, like storing the state in the NVRAM and using the keyboard controller to reset the processor, using the BIOS to detect that it wasn’t a normal reset and jumping to the kernel; or a faster one discovered later, using a triple fault).