| Author here. I am planning to do an in depth write up of how this works, but it seems Hacker News found it sooner :) When DSL is first invoked at the command line it boots up the Linux kernel which takes over control of the computer from DOS. Now here’s the trick: DSL makes use of a processor feature called VM8086 which allows for a 32 bit operating system to run legacy 16 bit code mostly natively. This feature is how early Windows, DOS extenders, etc worked. The Linux kernel also supports VM86, although it is largely undocumented and not really used these days. I think dosemu is the only major user of VM86 on Linux. DSL then returns to DOS, which has essentially been flipped inside out and is now unknowingly running inside a VM8086 task. Helpfully Linux does not appear to clobber DOS’s memory during its own boot process. DSL does just enough emulation of hardware like the keyboard to make things work, allowing DOS raw hardware access for everything else. This situation of running two operating systems at the same time on the same hardware is extremely fragile and unsafe of course, but it does seem to work surprisingly well anyway! |
Would be really cool if someone contributed a proper man page, I bet it would be a fascinating read.