Can I convert a 16-bit .exe program to a 64-bit .exe?

17,061

Solution 1

The problem goes beyond translating 16-bit instructions with 64-bit instructions. There is also the ABI (Application Binary Interface) used by the program to communicate with the rest of the system. A 16-bit program likely uses a lot of DOS calls and it's not unlikely it tries to access hardware directly too. There is no way this can be translated automatically. Even if such a solution existed, I highly doubt the result would be more efficient than running in a virtual machine (which actually is very efficient). Further more, programs written for 16-bit environment are often not very scalable, and completely unable to handle amounts of data beyond the capacities of the original target platform.

So I'd say there are really just two realistic solutions: Run it in a virtual machine. Or if that doesn't cut it, write a new application from scratch that does the same thing.

Solution 2

Even if this is a very old question, but I thought I'd write this solution for anyone still looking out there:

Using something like winevdm -which is a very light windows program- you can run 16-bit Windows (Windows 1.x, 2.x, 3.0, 3.1, etc.) on 64-bit Windows apps very easily!

Share:
17,061
Variadicism
Author by

Variadicism

Updated on June 17, 2022

Comments

  • Variadicism
    Variadicism about 2 years

    I realize that there will likely be no special converter programs or anything easy like that for such a task, but it imperative that I find some way to get a 16-bit program to run in 64-bit Windows. Due to the large amount of resources that must be dedicated to them, emulators will not be a good solution.

    The idea I had for this project was to decompile all the code from a 16-bit program, copy it, and re-compile it into 64-bit code. Is this at all possible using Eclipse or another programming environment?

    Basically, I want to make a 16-bit program run in 64-bit Windows without emulators. I realize that it's a tall order, but is it conceivable?

  • DADi590
    DADi590 over 3 years
    What if the program (game, in my case) was designed to work under Windows and refuses to work on DOS ("This program requires Microsoft Windows")? May it still use DOS calls? Or there's no such thing if we're talking about Windows, whatever the version is? Is it now only the instructions that need to be translated? (and headers too, I guess, but maybe more things too? - I'm just learning about this one, so that's why I said headers)
  • Fabel
    Fabel over 3 years
    Yes, programs designed specifically for Windows may use DOS calls, BIOS calls as well as access hardware directly. 16-bit Windows and the non-NT branch of 32-bit Windows (95 and 98) are more or less just an extensions to DOS and not so much complete operating systems of their own.