Program 0

Due: Thursday Jun 16, 8:30am.

You may find the following link helpful in getting you started with the UNIX operating system:
http://www.cs.wisc.edu/csl/cs1000

Purpose

This assignment is intended to give experience using a UNIX based operating system and introduce the software tools used in cs/ece354.

Statement

This assignment requires you to use several different software tools, including a simulator, web browser, and e-mail, to get answers that will be turned in.

  1. I have written a SAL program for you. You need to copy the program, run the program using the simulator, and make note of the program's output.
    The program is in the file
    ~cs354-1/public/bin/p0.s
    Copy the file to your own directory, and run the simulator using your copy. Take note of the program's output (i.e. put the output in a file).
  2. Almost everything you need to know about cs/ece354 is posted on your section's web page. You need to run a web browser, find your section's cs/ece354 home page, and make note of the two chapters that have been revised under the "Text" subheading.
  3. I may send important messages about cs354 via e-mail. I expect that you will read your e-mail often. I will send you e-mail on Tuesday, June 14. Do not reply to the e-mail. Instead, record your answers to the questions it contains in a file that will be turned in.
  4. Use an editor to enter all the things requested above into a file. This will include the simulated program's output, the revised book chapters, and the answers to questions asked in the e-mail. Also, put your name at the beginning of the file. Save the file as p0.txt

Notes

  1. We use a simulator to run programs. Run the simulator with
    ~cs354-1/public/bin/simp p0.s
    where p0.s is the name of the file containing the SAL source code.

    For the long term, you will want to add the directory ~cs354-1/public/bin
    to your path. See the FAQ (Frequently Asked Questions) portion of the cs/ece354 home page on the web on how to do this.

    After your path has been modified, you will be able to run the simulator with
    simp p0.s

  2. If you are already familiar with the UNIX operating system, then this assignment should take less than an hour to complete. Students new to UNIX may need to spend much more time. Some online documentation is available in the CS1000 handout. It can be accessed on the web at url
    http://www.cs.wisc.edu/csl/cs1000
    or purchased from the DoIT tech store for approximately $2.50.
  3. You will need to figure out how to log in, use the UNIX commands ls, cd, and cp. You will also need to use an editor. You may use any editor you like. Common choices are pico, emacs, and vi.

Handing In the Assignment

To handin your P0: Your file should contain the information specified in the P0 web page along with the information requested in the P0 email. Rename your file so it is called p0.txt (use the mv or cp command: mv whatever p0.txt) Copy the file to your handin directory for P0 located at ~cs354-1/handin/$name/P0/ where $name is your userid.

example: If my file were called prog0 and my userid was goadl, I would first rename my file to p0.txt:
% mv prog0 p0.txt
Then, I would copy the file to my cs354 P0 handin directory:
% cp p0.txt ~cs354-1/handin/goadl/P0/
That's it! If you want to make sure you copied the file over, cd to that handin directory and look at the file:
% cd ~cs354-1/handin/goadl/P0/
% ls                            (p0.txt should be the only 
                                 file listed)
% more p0.txt                   (shows the file)
% cd                            (goes back to your home directory)
If you have trouble with handing in, please see or email Laura.