echo 1 > /proc/sys/abi/ldt16
Some 16-bit programs under Wine might also need: echo 0 > /proc/sys/vm/mmap_min_addr
Edit: not sure about kernel version 3.14.However, for those people who only have an occasional use-case for keeping Win16 apps around, there's always the Win3.1x on DOSBox option.
For Example: https://joshmccarty.com/2013/08/run-windows-3-1-in-dosbox/
I would be highly surprised if MS would even try to shut it down. On what basis would it not be allowed to write an emulator that translates old Windows API calls to new Windows API calls? And even if they could shut it down, what does Microsoft stand to gain by doing so?
Pros: better performance, better memory usage, most instructions map 1:1, there's lots of extra registers for storing extra state required by the translation, easier debugging (you can compile each function separately and verify without running). Cons: harder debugging (at runtime), harder to test, properly translating memory segmentation, need to find a way to adjust all the offsets automatically, need to convert all the API function call conventions (can be quite tricky with variadic arguments).
Whereas a straightforward emulator of the 16-bit set with the standard computed jump table is fairly easy. Mostly requires a lot of typing. If your interpreter fits in the i-cache it can even be faster.
Although apparently since WINE will run 16-bit code, it looks like preservation of the 16-bit world is a Solved Problem.
(I've long wanted a human-assisted decompiler for 16-bit DOS/Windows code, as a means of salvaging old games. For a few games people have done this by hand and built modernised versions with the bugs fixed.)
I'm curious what do you mean by thunks in this case - specifically why would they be different than other code. Is it that the common code in original program may not be valid common code after translation?
If you're lucky (like me with EarthSiege 2), your game might also have a 32bit version, which you can run through IDA/Hexrays just fine.
(will try some of the suggestions in this comments thread too - thanks!)
An entirely different beast.
http://community.reactos.org/index.php/news/years-progress-n...
I can hear Jen rolling her eyes from here.
I don't think it should matter whether the original source was VC or not, and if you write a solution that does make it matter you'll find yourself tripped up a lot. (Your favourite game turns out to have been compiled with Watcom or Borland rather than VC, etc). Presumably if you could find the 16-bit VB interpreter bits and pieces you could run those too and run your VB app.
I did run across this blog post http://discuss.joelonsoftware.com/default.asp?joel.3.607174...., which could be turned into a Win10 complaint with a simple search-and-replace.
Some compatibility craziness, that isn't quite relevant to our win16 emulation case: https://blogs.msdn.microsoft.com/oldnewthing/20071224-00/?p=...