Mercurial > hg > Members > kono > nitros9-code
view docs/nitros9guide/chap1.chapter @ 1500:b00cf13c9f61
Major changes for new NitrOS-9 manual
author | boisy |
---|---|
date | Mon, 05 Jan 2004 00:51:19 +0000 |
parents | 4dae346c4969 |
children |
line wrap: on
line source
<chapter> <title>Getting Started...</title> <section id="sec1.0"> <title>What You Need to Run NitrOS-9</title> <para> To use NitrOS-9 Level 1, you'll need the following: </para> <itemizedlist mark="bullet"> <listitem><para>TRS-80/Tandy Color Computer or Color Computer 2 with 64K of RAM</para></listitem> <listitem><para>Disk Drive With Controller Cartridge</para></listitem> </itemizedlist> <para> To use NitrOS-9 Level 2, you'll need the following: </para> <itemizedlist mark="bullet"> <listitem><para>Tandy Color Computer 3 with 128K of RAM (512K recommended)</para></listitem> <listitem><para>Disk Drive With Controller Cartridge</para></listitem> </itemizedlist> <para> NitrOS-9 is also ready to use the following optional equipment that you may have now or may obtain in the future: </para> <itemizedlist mark="bullet"> <listitem><para>Additional Floppy Disk Drives</para></listitem> <listitem><para>SCSI or IDE Hard Drives</para></listitem> <listitem><para>Printers and Modems</para></listitem> <listitem><para>Additional Serial Ports</para></listitem> <listitem><para>Joysticks and Mice</para></listitem> <listitem><para>Other NitrOS-9 Compatible Languages and Software</para></listitem> </itemizedlist> <section id="sec1.0.1"> <title>Starting the System</title> <para> To start up NitrOS-9 from a floppy drive, follow these steps: <orderedlist numeration="arabic"> <listitem><para>Turn the Color Computer and disk drive(s) on. You should see the usual BASIC greeting message on the screen.</para></listitem> <listitem><para>Insert the NitrOS-9 System Disk in drive zero and close the door.</para></listitem> <listitem><para>Type "&DOSCMD;". After a few seconds of disk activity you should see a screen with the words "NITROS9 BOOT".</para></listitem> <listitem><para>NitrOS-9 will then begin its "bootstrap" loading process, which involves a number of seconds of disk activity. When the system startup has finished, a message followed by the shell prompt will be displayed.</para></listitem> </orderedlist> </para> </section> <section id="sec1.0.2"> <title>In Case You Have Problems Starting NitrOS-9</title> <itemizedlist> <listitem><para>If BASIC gives an error message after you type "&DOSCMD;", remove the disk, turn the computer off and on, then try again. If this repeatedly fails your NitrOS-9 diskette may be bad.</para></listitem> <listitem><para>Did you remember to turn the disk drive power switch on?</para></listitem> <listitem><para>Does your Color Computer meet the minimum RAM requirements? This is a must!</para></listitem> <listitem><para>If your Color Computer doesn't seem to understand the &DOSCMD; command, your controller has DOS 1.0. You will need to upgrade to DOS 1.1.</para></listitem> <listitem><para>If the "NITROS9 BOOT" message is displayed but nothing else happens, you may have a corrupted system disk. Hopefully you did make a backup!</para></listitem> </itemizedlist> </section> <section id="sec1.0.3"> <title>A Quick Introduction to the Use of the Keyboard and Disks</title> <para> For now, the only special keys on the keyboard of interest are the SHIFT key which works like a typewriter shift key; the ENTER key which you always use after typing a command or response to NitrOS-9; and the <- left arrow key which you can use to erase typing mistakes. </para> <para> Your main disk drive is known to to NitrOS-9 as "/D0" and is often called "drive zero". If you have a second disk drive (drive one), NitrOS-9 recognizes it as "/D1". Why would anybody put a "/" in a name? Because all input and output devices have names like files, and names that start with "/" are always device names. </para> </section> <section id="sec1.0.4"> <title>Initial Explorations</title> <para> When NitrOS-9 first starts up, it will display a welcoming message, and then ask you to enter the date and time. This allows NitrOS-9 to keep track of the date and time of creation of new files and disks. Enter the current date and time in the format requested like this: <screen> yyyy/mm/dd hh:mm:ss Time ? 2004 01 01 14 20 </screen> In the example above, the date entered was January 1, 2004. NitrOS-9 uses 24-hour time so the date entered was 1420 hours or 2:20 PM. Next, NitrOS-9 will print the shell prompt to let you know it is ready for you to type in a command. </para> <para> Now you're ready to try some commands. A good first command to try is <command>dir</command> (for "<emphasis>dir</emphasis>ectory"). This will display a list of the files on the System Disk. Just type: <screen> dir </screen> followed by a "return". NitrOS-9 should respond with a listing of file names which should look something like this: <screen> Directory of . OS9Boot CMDS SYS DEFS sysgo startup </screen> The file <filename>OS9Boot</filename> contains the NitrOS-9 program in &CPU; machine language, which was loaded into memory during the bootstrap operation. </para> <para> The file <filename>sysgo</filename> is only located on the NitrOS-9 Level 2 System Disk. It is the first program run on the system, and kick-starts the initial application (usually, the shell). </para> <para> The file <filename>startup</filename> is a "command file" which is automatically run when the system starts up, and has the commands that printed the welcoming message and asked for the time. Later, You may want to replace this startup file with your own customized version after you are more familiar with NitrOS-9. Do you want to see the contents of this file? If so, just type <screen> list startup </screen> As you can see, the <command>list</command> command displays the contents of files that contain text (alphabetic characters). Some files like the <filename>OS9Boot</filename> file contain binary data such as machine language programs. These files are called "binary files", and attempts to list them will result in a jumbled, meaningless display. On the other hand, NitrOS-9 will complain mightily if you try to run a text file as a program! </para> <para> As you may have surmised by now, the way you ask NitrOS-9 to run a program or command (they're really the same thing) is to simply type its name. Some commands like <command>list</command> require one or more names of files or options. If so, they are typed on the same line using spaces to separate each item. </para> <para> But where did the <command>list</command> and <command>dir</command> programs come from? There are really more files on the disk than you suspect. The <command>dir</command> command showed you what is the disk's <emphasis>root directory</emphasis> - so named because the NitrOS-9 file system resembles a tree. Growing out of the root directory are three "branches" - files which are additional directories of file names instead of programs or data. They in turn can have even more "branches" - ad infinitum. If you draw a map on paper of how this works it does look like a tree. The directory files on your system disk are called <filename class="directory">CMDS</filename>, <filename class="directory">SYS</filename>, and <filename class="directory">DEFS</filename>. The file <filename class="directory">CMDS</filename> is a directory that consists of all the system commands such as <command>dir</command>, <command>list</command>, <command>format</command>, etc. To see the files contained in this directory, enter: <screen> dir cmds </screen> which tells <command>dir</command> to show files on the directory file <filename class="directory">CMDS</filename> instead of the root directory. After you type this you should see a long list of file names. These are the complete set of command programs that come with NitrOS-9 and perform a myriad of functions. Chapter Seven explains each one in detail. The <command>dir</command> command also has a handy option to display the <filename class="directory">CMDS</filename> directory with less typing: <screen> dir -x </screen> Whenever you want a list of available commands you can use this so you don't have to look it up in the book. The <command>dir</command> command has options which can give you more detailed information about each file. </para> </section> </section> <section id="sec1.1"> <title>Making a Backup of the System Disk</title> <para> Before getting too much more involved in further experimentation, NOW is the time to make one or more exact copies of your System Disk in case some misfortune befalls your one and only master System Disk. Making a backup involves two steps: formatting a blank disk and running a backup program. </para> <section id="sec1.1.1"> <title>Formatting Blank Disks</title> <para> Before the actual backup procedure can be done (or any fresh diskette is used for any purpose), the blank disk which is to become the backup disk must be initialized by NitrOS-9's <command>format</command> command. </para> <para> IF YOU HAVE ONLY ONE DISK DRIVE you have to be extra careful not to accidentally FORMAT your system disk. Type: <screen> format /d0 </screen> and when you see the message <screen> COLOR COMPUTER FORMATTER Formatting drive /d0 y (yes) or n (no) Ready? </screen> immediately remove your system disk and insert a blank disk <emphasis>before</emphasis> you type "Y". IF YOU HAVE TWO DISK DRIVES place the blank disk in drive one and type: </para> <screen> format /d1 </screen> <para> WHEN THE BLANK DISK IS IN THE RIGHT PLACE, type "Y", then "ENTER". This initiates the formatting process. IF THE CORRECT DEVICE NAME (/D1) IS NOT DISPLAYED: TYPE N RIGHT NOW and start over, OR YOU MAY ERASE your System Disk. </para> <para> When you are asked for a disk name, type any letter, then ENTER. The name you give is not important. If you have only one drive, replace the system disk after the FORMAT program has finished. If the FORMAT program reported any errors, try again. Disks used for backups can't have any errors. You're now ready to run the <command>backup</command> program. </para> <para> It takes several minutes for the FORMAT program to run. During its second phase the hexadecimal number of each track will be displayed as it is checked for bad sectors. If any are found an error message for each bad sector is given. </para> </section> <section id="sec1.1.2"> <title>Running the Backup Program</title> <para> The <command>backup</command> program makes an exact duplicate of a disk. It can be used even if you only have one disk drive. </para> <para> IF YOU HAVE ONE DRIVE type </para> <screen> backup /d0 #32k </screen> <para> The <command>backup</command> program will prompt you to alternately insert the source disk (the system disk) and the destination disk (the freshly formatted disk). </para> <para> IF YOU HAVE TWO DRIVES type </para> <screen> backup #32K </screen> <para> The <command>backup</command> program will respond with </para> <screen> Ready to backup from /d0 to /d1? </screen> <para> Now enter Y for yes. It will then ask: </para> <screen> X is being scratched Ok ?: </screen> <para> Answer "Y" for yes again, and the backup process should begin. </para> <para> The <command>backup</command> command has two phases: the first phase copies everything from drive zero to drive one checking for errors while reading from the master but not for "write" errors. The second phase is the "verify" pass which makes sure everything was copied onto the new disk correctly. If any errors are reported during the first (copy) pass, there is a problem with the master disk or its drive. If errors occur during the second (verify) pass, there is a problem with the new disk and the <command>backup</command> program should be run again. If <command>backup</command> repeatedly fails on the second pass, reformat the disk and try to <command>backup</command> again. If <command>backup</command> fails again, the disk is physically defective. </para> <para> After you have made your backup disk, try turning the Color Computer off and restarting the system with the copy you just made. If it works OK, store it in a safe place in case it is needed later. You should always have a backup copy of your system disk and all other important disks. </para> </section> </section> </chapter>