I want to bring to your attention the Emscripten project http://kripken.github.io/emscripten-site/. This is an extract from their website:
The Emscripten is a highly regarded compiler by people from all sort of industries. Most notable game industry can benefit of Emscripten to port their games to the web. In other words a classic C++ game can now run in a web page without any plugin. Just check this page for a huge list of games that you can now play in the browser: https://github.com/kripken/emscripten/wiki/Porting-Examples-and-Demos
What can you port to web browser is up to your imagination now.
I will mention though one small project that took advantage of the Emscripten technology: the DOSBOX http://www.dosbox.com project. DOSBOX is an emulator of x86 machines indented to run old DOS programs on top of modern operating systems such as Windows 10 x64.
While DOSBOX is mostly used by people to play old games, it can be successfully used by enterprises to continue run those not yet ported DOS applications.
Personally I just played with DOSBOX the other days when I use it to revive some of my old applications with the intent to capture a few screenshots and screencasts. I announced in a previous article that I open-source some of my 20+ years old software… therefore I needed a few screenshots. And I got plenty (as seen in Physics http://www.vmasoft.net/physics.html and MCGA software http://www.vmasoft.net/mcga.html ).
Anyway… back to the subject. While I used the regular DOSBOX version in my initial experiment, I soon discovered that there is a DOSBOX version compiled with Emscripten https://github.com/dreamlayers/em-dosbox. This version runs basically in a web page. And since DOSBOX is basically an emulator, you can run other PC based software (for which you don’t own the source code) inside a web browser. There are plenty of examples on the internet ranging from running DOS based games inside browser to running the full Windows 3.1 or even Windows 95 inside a Chrome browser.
And it works! It is true that Windows 95 takes a little bit longer to load and runs a little bit slower to be any good… but it works.
On the other hand Windows 3.1 or regular DOS applications load like a charm. The Internet Archive Web site has a collection of DOS games and Windows 3.1 DOSBOX installations available for testing.
Check out Windows 3.1 running inside my Chrome browser: https://archive.org/details/win3_stock
Before ending this article let me mention that there are also other ways of running binary legacy code inside a web browser besides using the Emscripten DOSBOX project.