DOS Subsystem for Linux
This has prompted some unexpected reflection. If I may, I have a somewhat orthogonal (tangentially related), <i>slightly</i> soapbox-y, philosophical question about the meaning of meaningfulness, which may not make any sense (recommendations for good sanitariums accepted).<p>The GIF of this shows<p><pre><code>  C:\&gt;dsl
  Starting DOS subsystem for Linux, please wait... ok
  
  C:\&gt;_
</code></pre>
and this immediately got me headscratching about the mechanics of how this was done. My first serious consideration (after noticing the Building section and hastily discarding notions of &quot;remote&#x2F;out-of-band terminal I&#x2F;O...?&quot;) was that it was somehow boxing Linux up into a TSR and then somehow running that in the background. <i>Coool.</i><p>But no; the custom init.c uses virtual 8086 (vm86) mode to call back into DOS, trapping on a specific interrupt to enable DOS&lt;-&gt;Linux communication. The launcher loads Linux into memory and jumps into it just like a bootloader would, then the init program maps the first 1MB of RAM (to cover all 640K of conventional memory) and hands the whole DOS address space area to vm86(2) to continue within DOS where everything left off. So, this isn&#x27;t a TSR in the literal sense (it doesn&#x27;t exit using INT 27h, &quot;Terminate and stay resident&quot;), nor in the figurative sense, wherein the program encapsulates Linux and then returns to DOS (which certain interpretations of the program output might suggest) in the same way exiting Netware or Windows 9x (&quot;reboot in DOS mode&quot;, in certain circumstances) would. (But there are some interesting &quot;it quacks like a duck&quot; arguments in there, I can&#x27;t deny that.)<p>The actual situation is basically the reverse of my first impression - this isn&#x27;t a TSR that runs Linux, it&#x27;s a DOS program that launches Linux that then continues DOS using v86. I&#x27;ve read how mainframes perform similar insanity, like where the kernel will initialize a VMM and then promote the bootloader&#x2F;boot-up code into a task&#x2F;process during startup. By some measures, this madness is arguably more awesome than a TSR.<p>Now, my question, which is squishy, and which I don&#x27;t know how to articulate well (read: more concisely). Being able to run Linux in a TSR - <i>cooool</i> - leaps out at me as a captivating ball of interestingness that stands well above all the &quot;oh yeah that would be kind of neat to look at one day... after I count to infinity twice&quot; 
intrinsically non-interesting, passive armchair thoughts I&#x27;ll forget within seconds of thinking of them. But I&#x27;d probably be able to keep coming back to an idea like &quot;Linux in TSR&quot; for many months before giving up.<p>Flip the whole thing around, though (&quot;start Linux and then resume DOS in emulation&quot;), and poof, the interestingness is all gone. I think this is <i>not</i> because I consider the idea fundamentally less <i>cool</i> (or worse, think it&#x27;s outright silly or stupid!), but due to the <i>opposite</i> physiological reaction.<p>I discovered <a href="https:&#x2F;&#x2F;www.teamten.com&#x2F;lawrence&#x2F;writings&#x2F;norris-numbers.html" rel="nofollow">https:&#x2F;&#x2F;www.teamten.com&#x2F;lawrence&#x2F;writings&#x2F;norris-numbers.htm...</a> yesterday. It was a really cool read, describing how programmers hit walls in terms of how much code they can write (and presumably then continue to reason about) before everything devolves into madness. I think I&#x27;ve been dealing with an almost identical type of wall for some time, which I&#x27;m not sure how to scale.<p>Learning and experience seem to basically be ways to build neurological surface area (or, room to store irreducible complexity) that allow us to stuff more and more <i>stuff</i> into our creative problem-solving&#x2F;reward loops (&quot;productivity: finding happiness, just with ever more (and more...) steps!&quot;). As this develops, and as we associatively fold <i>doing more things</i> into our reward loops, it seems that the habit-forming parts of the brain coordinate subconsciously with the parts of our executive function that internalize the core intrinsics of whatever we&#x27;re learning about, and we just find ourselves especially drawn to things that will further deepen and specialize our understanding. And sometimes, we find areas are so interesting that the persistence is just <i>there</i> to keep at certain things even when they&#x27;re hard. And that persistence... is our worldview, or focal point, of &quot;what I&#x27;m doing right now&quot;. It&#x27;s our baseline watermark, or threshold, of keeping on.<p>But this process seems to have a hair-trigger limit. Push the whole thing even a tiny bit too hard, and it loudly cracks, sparks fly and springs and gears go everywhere.<p>I think the inspiration associated with restriction and limitation is strongly related to this. It seems that the most fun projects are those that exceed an individual&#x27;s (socially?) measured accomplishment by a significant amount, but fit well within the complexity scale of the untapped feedback-loop surface area.<p>Which leads me to my current existential juxtaposition. The systemic incoherence that accompanies ADHD, autism and depression (or any combination thereof), and the subsequent conscious &quot;driving&quot; of the brain (and veering all over the metaphorical road, without access to the feedback loops available to the subconscious), exacerbates this situation; without the machinery to maintain relaxed focus without losing disorientation, I constantly consciously course-correct - but these systems do not like to be &quot;driven&quot;, they only function correctly when they can lead, and when there is harmony.<p>It also seems very difficult (at the very least) to consciously drive the machinery&#x2F;focus that builds raw mental capacity; I wonder if this construction process is subconscious by design, while the usage or resolution process of achievement, that chases the delta between untapped potential and achievement, is conscious by design. If so, <i>yay</i>.<p>Without the cohesion of subconscious-first leadership, building and maintaining this delta between capacity and interest is a game of second-guessing how my brain works, which I&#x27;m not winning at, and so the level of <i>fundamental</i> interest I have in the sorts of things I do want to master lags behind my <i>logical</i> interest levels.<p>To complete my question, I look at projects like this, and I perceive their complexity scales like a person standing within a tiny fenced-in square and saying &quot;I am outside the fence&quot;. If the person were defined to be inside the tiny square, that would represent a small amount of problem-solving complexity that might even be described as &quot;cute&quot; (see also: every <i>well-executed</i> minimalist software project ever). But with the definitions flipped around, the complexity quotient might as well be practically infinite, because it falls outside of the incredibly narrow window of surface area I have available, which I don&#x27;t know how to build upon and expand, and so the interest just vaporizes. Thus, this project is <i>too cool</i> to be fundamentally interesting to me! :( (And yes, this is a meta-explanation; the &quot;Linux in DOS vs DOS in Linux&quot; pathway was what got me thinking about all this, and then gave me the mental framework to follow the ideas well enough to write them down.)<p>So, to anyone out there that this makes sense to, who has maybe figured out how to, well, <a href="https:&#x2F;&#x2F;twitter.com&#x2F;Davidson_03&#x2F;status&#x2F;846740485200891909" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;Davidson_03&#x2F;status&#x2F;846740485200891909</a>...<p>...I&#x27;m stuck. My brain thinks that logical awesomeness should directly translate to follow-through and persistence. I logically know it doesn&#x27;t work that way (something something <i>effort</i>). But there&#x27;s a short-circuit somewhere (kinda like the example of the monkey who had its fingers bound together for a few months, then couldn&#x27;t move them independently - except instead of fusing, I&#x27;m dealing with something that never spliced apart), and the step(s) that are supposed to go in the middle are missing. Wat do, if you by any chance know?<p>This was a weird ramble, and if you got to the end of it, thanks very much for taking the time.