{"id":11723,"date":"2011-01-19T07:00:00","date_gmt":"2011-01-19T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2011\/01\/19\/why-didnt-they-use-the-space-shuttle-to-rescue-the-apollo-13-astronauts\/"},"modified":"2025-03-16T16:44:32","modified_gmt":"2025-03-16T23:44:32","slug":"20110119-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20110119-00\/?p=11723","title":{"rendered":"Why didn&#8217;t they use the Space Shuttle to rescue the Apollo 13 astronauts?"},"content":{"rendered":"<p>Many decisions make sense only in the context of history.<\/p>\n<p>Much like the moviegoers who were puzzled <a href=\"http:\/\/spaf.cerias.purdue.edu\/Yucks\/V5\/msg00021.html\"> why NASA didn&#8217;t just use the Space Shuttle to rescue the Apollo 13 astronauts<\/a>, computer users of today, when looking back on historical decisions, often make assumptions based on technology that didn&#8217;t exist.<\/p>\n<p>Consider, for example, pointing out that <a title=\"What happened to winipcfg and netmon?\" href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20080407-00\/?p=22843\"> the absence of a console subsystem in Windows\u00a03.1<\/a> was no excuse for not porting the <code>ipconfig<\/code> program as a character-mode application. &#8220;Sure maybe you didn&#8217;t have a console subsystem, but <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2008\/04\/07\/8364033.aspx#8365554\">why not just use the DOS box<\/a>?&#8221;<\/p>\n<p>The MS-DOS prompt is a virtual machine running a copy of MS-DOS. Since it&#8217;s a virtual machine, as far as the MS-DOS prompt is concerned, it&#8217;s just running all by its happy self on a dedicated computer running MS-DOS. In reality, of course, it&#8217;s running inside a simulator being controlled by Windows, but the point of the simulation is so that old applications can continue to run even though they think they&#8217;re running under MS-DOS.<\/p>\n<p>&#8220;There wasn&#8217;t any security in place with Win 3.1, so any program run from a DOS box should have been able to affect anything on the system.&#8221;<\/p>\n<p>Since the MS-DOS prompt ran in a virtual machine, everything it did was under the supervision of the virtual machine manager. If it tried to access memory it didn&#8217;t have permission to access, an exception would be raised and handled by the virtual machine manager. If it tried to execute a privileged instruction, an exception would be raised, and the virtual machine manager would step in with a &#8220;Nope, I&#8217;m not going to let you do that&#8221; and terminate the virtual machine. In a sense, programs running in the MS-DOS prompt actually ran with <i>more<\/i> protection and isolation than Windows applications running on the desktop, because Windows created <i>a whole separate universe<\/i> for each MS-DOS prompt.<\/p>\n<p>One of the consequences of virtualization is that programs running in the MS-DOS prompt are plain old MS-DOS applications, not Windows applications. There is no Windows API in MS-DOS, so there is no Windows API in the MS-DOS prompt either. (It&#8217;s like running Windows inside a virtual machine on your Linux box and wondering why your Windows program can&#8217;t call <code>XCreateWindow<\/code>. It can&#8217;t call <code>XCreateWindow<\/code> because that&#8217;s a function on the host system, not in the virtual machine.)<\/p>\n<p>Okay, but let&#8217;s suppose, just for the sake of argument, that somebody poked a hole in the virtual machine and provided a way for MS-DOS programs to call WinSock APIs.<\/p>\n<p>You still wouldn&#8217;t want <code>ipconfig<\/code> to be an MS-DOS program.<\/p>\n<p>Recall that Windows\u00a03.1 ran in one of two modes, either <i>standard mode<\/i> or <i>enhanced mode<\/i>. Standard mode is the version designed for the 80286 processor. It didn&#8217;t have virtual memory or support for virtual machines. When you ran an MS-DOS prompt, standard mode Windows would freeze all your Windows programs and effectively put itself into suspended animation. It then ran your MS-DOS program (full-screen since there was no Windows around to put it in a window), and when your MS-DOS program exited, Windows would rouse itself from its slumber and bring things back to the way they were before you opened that MS-DOS prompt.<\/p>\n<p>It would kind of suck if getting your computer&#8217;s IP address meant stopping all your work, shutting down Windows (effectively), and switching the video adapter into character mode, just so it could print 16 characters to the screen.<\/p>\n<p>&#8220;Well, who cares about standard mode Windows any more? Let&#8217;s say that it only works in enhanced mode. Enhanced mode can multi-task MS-DOS prompts and run them in a window.&#8221;<\/p>\n<p>Recall that the minimum memory requirements for Windows\u00a03.1 in enhanced mode was 1664KB of memory. Given that each MS-DOS box took up about 1MB of memory, you&#8217;re saying that displaying 16 characters of information is going to consume over half of your computer&#8217;s memory?<\/p>\n<p>&#8220;Okay, helpdesk wants to know my IP address so they can troubleshoot my computer. In order to do that, I have to run this program, but first I need to save all my work and exit all my programs in order to free up enough memory to run the program they want me to run.&#8221;<\/p>\n<p>Better to just write a simple Windows application.<\/p>\n<p><b>Bonus commentary<\/b>: 640k asks, &#8220;<a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2008\/04\/07\/8364033.aspx#8365758\">Why wasn&#8217;t winipcfg called ipconfig<\/a>?&#8221;<\/p>\n<p>Right. &#8220;Let&#8217;s have two completely different and incompatible programs with the same name.&#8221; See how far you get with that.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Understanding decisions in the context of history.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2],"class_list":["post-11723","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history"],"acf":[],"blog_post_summary":"<p>Understanding decisions in the context of history.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/11723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=11723"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/11723\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=11723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=11723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=11723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}