home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / magazine / mpc93jun.zip / NDOS.TXT < prev    next >
Text File  |  1993-05-30  |  11KB  |  193 lines

  1.      NDOS  ?  
  2.      by Chris Bieda
  3.  
  4.      Why You Should Delete   command.com  
  5.  
  6.      In the Beginning
  7.  
  8.      Sooner or later, every victim of the MS-DOS and PC-DOS operating 
  9.      systems comes to learn that there are three essential files that 
  10.      compose the core of the systems. (In MS-DOS, these are msdos.sys,
  11.      io.sys and command.com; in PC-DOS, ibmdos.com, ibmbio.com and 
  12.      command.com.) This knowledge usually is acquired shortly after the 
  13.      user deletes  command.com  because it doesn't appear to do anything 
  14.      useful, and besides, it's taking up disk space. (This is also the 
  15.      point at which many users learn the expressions "bootable disk"   
  16.      and "boot floppy.")                                
  17.  
  18.      The undaunted few proceed beyond this sobering experience to learn 
  19.      what command.com actually does: it supplies the interface, a command 
  20.      line, to DOS, as well as provides certain fundamental utilities, like   
  21.      copy and rename, and delete and "dir." (The fact that command.com   
  22.      accepts what you type to the command prompt and decides how to 
  23.      handle it, either by processing the command itself, or loading 
  24.      another program to do so, is why it is referred to as "the," or more 
  25.      properly, if rarely, "a" command processor or command interpreter.)
  26.  
  27.      This ascension to the intermediate heights of power userdom is often 
  28.      followed by the shocking revelation that command.com is, in fact, an  
  29.      optional interface, at least insofar as you need not use command.com   
  30.      if you have another command processor available!
  31.  
  32.      (Just as an aside, if there is reading this an OS/2 user who is not 
  33.      familiar with DOS,  your cmd.exe serves the same purpose as DOS's 
  34.      command.com, and it is just as optional!)
  35.  
  36.      Command Processor Options
  37.  
  38.      Besides DOS's command.com, there are two other options for command 
  39.      processors that I know of (I would be glad to learn of others): the 
  40.      JP Software company's 4DOS, a shareware program, and the Symantec 
  41.      Corporation's  NDOS. In fact, these two programs are extremely 
  42.      similar, largely because NDOS is a licensed OEM version of an 
  43.      earlier release of 4DOS!  NDOS is supplied with version 6.xx of The 
  44.      Norton Utilities, for many the indispensable set of DOS utilities, 
  45.      and corresponds roughly to version 3.02 of 4DOS, which is currently 
  46.      at version 4.01d.
  47.  
  48.      Since many of us own The Norton Utilities, and many more should, 
  49.      I will describe cool features of NDOS  throughout this series. You 
  50.      should note, however, that virtually everything I describe works 
  51.      precisely the same way in the newer  4DOS  , and if you don't own the  
  52.      Norton package, you can attain the same level of functionality by 
  53.      using 4DOS (which is available from our BBS service, as well as our 
  54.      public domain and shareware library service, Public Brand Software). 
  55.      By the end of my tour, I suspect that quite a few of you will delete   
  56.      command.com  one last time, because these optional processors are 
  57.      great!             
  58.  
  59.      Compatibility Considerations
  60.  
  61.      Probably the coolest feature of NDOS is that it is fabulously 
  62.      compatible. In fact, since booting to it for the first time over a 
  63.      year ago, I haven't found a single application or utility, or DOS   
  64.      routine, that gags or runs differently.                            
  65.  
  66.      This is no small feat, since there are literally dozens of books out 
  67.      there with titles like Undocumented DOS or Secrets of the Command 
  68.      Line Bill Gates Doesn't Want You To Know.  DOS, like any complex  
  69.      operation (it is a system, after all), is full of bugs, leftover 
  70.      code  (with leftover unintentional results) and back and trapdoors, 
  71.      as well as undocumented or unsupported features. To successfully 
  72.      support  Windows 3.x,  DESQview, and some of the worst-written TSR's 
  73.      (terminate and stay resident, or "pop up," programs) ever, which were 
  74.      written for command.com exclusively, NDOS must mimic the basic 
  75.      operations of command.com almost perfectly. Based on my experience, 
  76.      it does.      
  77.  
  78.      Installation
  79.  
  80.      A lesson many support personnel learn, often by painful trial and 
  81.      error, is to get command.com tucked safely away in some place 
  82.      that del-happy tyros won't easily find it (this is called "making 
  83.      your life easier"). The traditional remedy has been to copy 
  84.      command.com to a subdirectory, say the c:\dos subdirectory, and to 
  85.      add the following line to the config.sys file in the root directory: 
  86.  
  87.  
  88.      shell=c:\dos\command.com c:\dos /p   
  89.  
  90.  
  91.      which instructs DOS to look for command.com in the specified 
  92.      subdirectory at bootup, to look for a copy of command.com in c:\dos   
  93.      when (if) it needs to load another, and (the "/p"  part) to leave 
  94.      DOS running that particular processor ( c:\dos\command.com ) 
  95.      when the bootup procedure is done. (It will also cause 
  96.      c:\autoexec.bat to be run, which is most often a good thing!)
  97.  
  98.      Once these modifications were made (and with a bootable floppy at 
  99.      the ready), c:\command.com was deleted, and the system rebooted 
  100.      to look for, and use, the command.com tucked away. This often 
  101.      solved the problem of del -zeal. (It remains recommended.)
  102.  
  103.      This same method is used to call NDOS instead of command.com, 
  104.      to wit: 
  105.  
  106.  
  107.      shell=c:\norton\ndos.com c:\norton /p   
  108.  
  109.  
  110.      So much for installation.
  111.  
  112.      Making It All Pretty
  113.  
  114.      For real DOS-jockeys, the command-line, and not some fancy menuing 
  115.      interface like Windows, GeoWorks or even  XTree, is the only way to 
  116.      fly; it's certainly quicker, and "doing" the command-line marks you 
  117.      as a real pro. It's what separates the adults from, say, Macintosh   
  118.      users (just kidding folks). And for these people, the appearance of 
  119.      their beloved DOS   "prompt" (the onscreen "message" displayed while  
  120.      DOS awaits your next command) is critical. It must be useful, perhaps 
  121.      fanciful, but certainly unique.
  122.  
  123.      Probably 95% of all DOS systems have a prompt that looks like "A" or 
  124.      "C" or "A:\" or "C:\".   While these are useful (surely the latter 
  125.      pair more than the former), they are not fanciful, nor unique.
  126.      command.com gives you a handful of prompt customization options, but 
  127.      NDOS supplies more, including perhaps the coolest prompt 
  128.      feature imaginable, the (jargon-alert!) "shell nesting level."
  129.  
  130.      Back up a moment. The "shell," as you might have gathered by now, is 
  131.      the context in which DOS software (applications and utilities) are 
  132.      run.  It is established and maintained by the command processor 
  133.      (whether command.com or NDOS), and a single context (instance of the 
  134.      shell) is often all that a user, particularly one who works solely 
  135.      within single applications (like 1-2-3 or WordPerfect) requires.
  136.  
  137.      Many users, however, use and enjoy a feature supplied by many 
  138.      applications, commonly referred to as "shelling to DOS," or "opening 
  139.      a DOS shell." These functions give the appearance of temporarily 
  140.      exiting the application and returning to a point immediately before 
  141.      the application was loaded, when the user was staring at a DOS prompt.
  142.  
  143.      In fact, this is an illusion. Far from exiting the application, 
  144.      opening up a shell from within it temporarily suspends the 
  145.      processing of that application (disconnecting it, as it were, from 
  146.      the keyboard, display, disk drives, etc.), and opens up another 
  147.      application:  the command processor.  
  148.  
  149.      You see, whether you are using command.com, ndos. com or 4dos.com, 
  150.      you are already running a program (hence the ".com" for a  command 
  151.      file), which is a command processor, or "shell." When you load  
  152.      1-2-3 into that shell, you have now loaded  two   programs, the 
  153.      second beneath the first. When you use that second program's 
  154.      ability to "shell" to DOS, you open a third program (another shell), 
  155.      and while in that second shell, you may even open a fourth, such as 
  156.      a small utility program. God help you if that fourth program also 
  157.      allows shelling to  DOS   (if you're keeping count, number five), 
  158.      for if you do so, you may well get lost in your shells! This is 
  159.      hazardous in the extreme when using  command.com-based shells, for t
  160.      here is no simple way to tell if you are at the bottom of the "stack:"
  161.      all the shells (command lines) look alike! (Several applications 
  162.      modify    the prompt in the shells they spawn, to help clue you in,  
  163.      e.g., "Type "exit" to return to WordStar.;" many simply do not.) 
  164.      Should you shut your computer off (or should it lock up) while in a 
  165.      "nested" (number two or subsequent) shell, all your work in the 
  166.      applications resting below that was not saved before you went 
  167.      shelling will be lost.  Scary stuff.
  168.  
  169.      NDOS enables a delightful prompt modification that can permanently 
  170.      save your bacon. Putting the lowercase letter z into your prompt 
  171.      string will imply the number of shells you have invoked by 
  172.      displaying the sequence number of the one you are currently in, 
  173.      starting with "0" (zero) for the first. So, for example: 
  174.  
  175.      prompt Level z [$p$g]   
  176.  
  177.      will return a prompt of "Level 0 [C:\]" when you are in the first 
  178.      (primary) shell, "Level 1 [C:\]" when in the second, and so on. As a 
  179.      result, when you are at any NDOS prompt, you know if there remain 
  180.      matters beneath the current shell that require your attention. (At 
  181.      Level 0, there is not; at other Levels, there are.) This is, of 
  182.      course, no help whatever when the computer locks up in a secondary 
  183.      or tertiary (or . . . ) shell, but when you are in control, you are 
  184.      never blind.
  185.  
  186.      To be perfectly honest, so much do I use shells, and so few of these 
  187.      shells provide customized prompts by themselves, that this one cool 
  188.      feature would warrant my use of NDOS  over command.com.
  189.  
  190.      But there's more to  NDOS   than this, like faster batch file 
  191.      processing, interactive batch files, and a   doskey   facility that 
  192.      allows you to customize your environment to an amazing extent while 
  193.      saving RAM!