Edit: Also a 16bit windows executable version of GREP, just tested on a 32bit version of Windows and it still works (but not on 64bit)
Edit: Also a 16bit windows executable version of GREP, just tested on a 32bit version of Windows and it still works (but not on 64bit)
But at this point I can see why MS would not bother with it
So you have the ass-backwards situation where %WINDIR%\System32 is full of 64bit dlls, and %WINDIR\SysWOW64 is full of 32bit dlls.
WOW64 (in 64-bit Windows OSes) does 32-bit to 64-bit.
The naming of System32 made sense back when they came up with it, but now it's a bit ridiculous. However, since there are so many incompetent Windows programs using hard-coded paths instead of SHGetFolderPath (including, BTW, literally every Java desktop app that doesn't include its own shim-- the JVM itself has this bug!), it's something Microsoft doesn't have the ability to fix.
At my last job, we would occasionally need to dig up old code because Microsoft finally removed something they had deprecated several years before. I think it was always amusing.
One case that stands out was a utility program that would update data for our users each month. I needed to change something about the string handling. After updating the data, the program would enumerate all running software and kill any copies of our program (so that they would need to read the new data on startup). I noticed that we went through the trouble of enumerating 32-bit and 16-bit programs. Since we hadn't shipped a 16-bit version of our software since the '90s, and we had changed our data format significantly since then, I happily ripped that code out. I don't think you can find information on 16-bit Windows on MSDN anymore.
I guess, to put it another way, who's shipping 16-bit programs?
This guy is doing just that in .NET. While he uses a full blown CPU emulator for executing 16bit x86, the hard part is all the thunking and bidirectional mapping of handles and memory pointers and stuff: https://medium.com/@CantabileApp/implementing-window-messagi...
The huge downside is of course the lack of integration with your main OS - copy&paste and drag&drop of rich/dynamic content, OLE embedding, keyboard settings, shared file systems and drive letters, printer drivers, all sorts of windows preferences, applications installing random global windows hooks, etc etc.
Now Microsoft probably could have engineering a real solution to continue DOS/16-bit support - either via VT-x or just a different solution. But it would have cost engineering hours - for what is a diminishing return.
[1] - https://en.wikipedia.org/wiki/Virtual_8086_mode#64-bit_and_V...
True. But the do work on Wine on modern 64-bit Linux. :) In fact, even DOSEMU works on modern 64-bit Linux -- take that, Windows backwards compatibility! (But use DOSEMU2 if you do this -- it's better supported.)
> since x86-64 processors lack the ability to run in 16-bit mode.
Not true.
64-bit processors running in "long mode" (i.e. running a 64-bit kernel) can't enter "virtual 8086" mode, which makes various real mode emulation (DOS non-protected mode, for example) awkward. But modern CPUs are so fast that they can emulate this kind of code very well, and CPUs with virtualization extensions can run real mode or virtual 8086 mode code in a VM even when the host is 64-bit.
(64-bit kernels can, in theory, switch out of long mode temporarily, but this is an incredible mess. Linux used to do it for certain UEFI compatibility scenarios, but this proved to be deeply problematic, and Linux doesn't do that any more.)
I'm literally spinning up DOSEMU today to run a bunch of old DOS compilers (Watcom). I can't find much on DOSEMU2 other than its release logs, which seem focused on games and amd64. I think that Lredir/emufs (access to the Linux filesystem) and "dumb" stdin/out are important features to me.
So Stas made a dosemu2 repo on github, with the additional benefits of being a more modern development environment than sourceforge.
It's worth having a play with, some of the older more knarly parts of the source are getting dealt with.