CS 207 Assignments

Unless the assignment provides other instructions, please submit all programs using the Homework Submission Program, and all non-program assignments via paper or e-mail to Jeff Ondich.

Listed in reverse order according to due date.

  1. Assigned, sort of, on 10/28/96, due on paper on 11/1/96. For both the simple and the multi-cycle implementations of Chapter 5, you are to make whatever changes are necessary to include the jr and jal instructions. In particular, to extend the simple implementation, you will need to modify Figures 5.30 and 5.33, and to extend the multi-cycle implementation, you will need to change Figures 5.38, 5.39, and 5.47. While you're fixing Figure 5.30, please add whatever is necessary to control the j instruction, too. You will probably find it helpful to drop a few dimes in a photocopier for this assignment.
  2. Assigned 10/18/96, due on paper on 10/23/96. Do problems 1, 2, 11, 13, 25, 31-33 from Chapter 4 of Hennessy and Patterson.

    In addition, explain in detail the function-calling conventions used by the C compiler "cc" on our SGI's (green, blue, and cyan.mathcs.carleton.edu). Among the questions you might address are:

    The main technique I would use to investigate these questions is to write lots of little C programs and compile them to assembly using "cc -S". If you are not familiar with C, please talk to me. Have fun.

  3. Assigned 9/27/96, due on paper or via e-mail to jondich on 10/2/96. Do problems 14-20, 22, 32, and 33 from Chapter 2 of Patterson and Hennessy.
  4. Assigned 9/18/96, due 9/30/96. Write a PDP8 program that clears as much memory as possible. If your program clears all memory, including the program itself, you will earn an A+. Clearing all but one location is worth an A, all but two is worth an A-, etc. Note, by the way, that if you clear all memory, your program will not halt by itself. (What will it do?)
  5. Mentioned 9/18/96, due 9/27/96. Write a function for the PDP8 that uses recursion to compute the Nth triangular number. Your main program will get N from the switch register and call a recursive function with N as its parameter. The recursive function, upon return to the main program, will have left the Nth triangular number (T(N) = 1 + 2 + ... + N) in the AC.
  6. Assigned 9/18/96, due 9/23/96. Write a multiplication subroutine for the PDP8. This time when the subroutine is called, the AC will contain the address of the first of four memory locations. The first two of these four locations should contain the two factors. When the multiplication routine returns, the third and fourth memory locations originally pointed to by the AC will contain the high and low words, respectively, of the product. Your multiplication routine must multiply correctly, taking both overflow and sign into account.
  7. Assigned 9/16/96, due 9/18/96. Write a multiplication subroutine for the PDP8. At the time the subroutine is called, the AC should contain the address of the first of two consecutive memory locations, in which the factors will be stored. When the multiplication subroutine returns, the AC should contain the product. For this assignment, don't worry about negative numbers or overflow.
  8. Assigned 9/13/96, due 9/16/96. Assignment #1
  9. 9/11/96 Read Chapter 1 of Patterson and Hennessy.

Suggested Reading

  1. 9/23/96 Read Chapter 2 of P and H.
  2. 9/11/96 Read Chapter 1 of Patterson and Hennessy.




Jeff Ondich, Department of Mathematics and Computer Science, Carleton College, Northfield, MN 55057
(507) 663-4364, jondich@carleton.edu