News for hackers. Stuff that matters.
Re:The Secret Feature of EM-DOSBOX on Internet Archive by digi_owl on Saturday January 30, 2016 @04:53PM (#11003943)
Things like this just make my mind spin when contemplating the number of layers invoked to get it working.

an OS running inside DOSBOX compiled to JS deliver over HTTP/TCP/IP to be interpreted by a browser (at this point perhaps a OS in its own right) running on top of a OS on top of a CPU.

It really feels like we are back in the leased terminal era...

Re:The Secret Feature of EM-DOSBOX on Internet Archive by TazeTSchnitzel on Saturday January 30, 2016 @05:04PM (#11003992)
Yep! And you can even run DOS apps inside Windows 95, so you can have Virtual 8086 Mode inside your virtual x86 CPU (DOSBox) inside your JavaScript virtual machine, inside a sandbox...

Disk access here is fun through the sheer number of layers. Consider a DOS prompt inside 95. When a DOS application tries to perform an I/O operation, it will make a DOS system call. DOS, in turn, will call the BIOS. This BIOS call will be intercepted by Windows 95 which, since it has no 32-bit disk driver (DOSBox doesn't simulate a real disk controller), will pass it on to DOS (the one underlying 95), which in turn will make a BIOS call. Everything before this point has been under DOSBox's x86 emulation. We then go through to the C++ fake BIOS of DOSBox, which handles the BIOS call by calling the C standard library I/O functions. However, those have been replaced by emscripten's shims, which will grab that data from the asm.js heap somewhere (or does it ferry it out to JS? I'm not sure.)

And DOSBox itself has been compiled to asm.js (which your browser may compile to machine code through JIT) and is running in your browser's JS VM. Which, if the browser you're using is on Windows, may be a 32-bit version, which is running under Windows's WOW64 (Windows 32-bit on Windows 64-bit)...

The layers never end!

http://i.imgur.com/lcZZ5YU.png

Re:The Secret Feature of EM-DOSBOX on Internet Archive by MrRadar on Saturday January 30, 2016 @06:58PM (#11004433)
Reminds me of The Birth and Death of Javascript: https://www.destroyallsoftware.com/talks/the-birth-and-death...
Re:The Secret Feature of EM-DOSBOX on Internet Archive by seanp2k2 on Saturday January 30, 2016 @04:57PM (#11003960)
Every few months someone finds a way to put another turtle on top, and some of those attempts stick.
Re:The Secret Feature of EM-DOSBOX on Internet Archive by breatheoften on Saturday January 30, 2016 @06:15PM (#11004255)
Wonder if it would work in iOS Safari running on the iOS simulator ...