Assignments are due at class time (8:30 AM) on the due date unless otherwise indicated. Assignments handed in after 8:30 AM on the due date will have 25% deducted from their scores. Assignments handed in the day after the due date will lose 50%. Assignments handed in after that may or may not be graded, depending on the grader's schedule, but will receive no credit in any case.
To submit programming assignments, use HSP.
Assigned Wednesday 9/17/03, due Friday, 9/19/03. Meeting the PDP8/E . Please submit on paper.
Assigned 9/19/03, due Friday, 9/26/03. Write a multiplication subroutine for the PDP8. When the subroutine is called via a JMS call, memory locations 0174 and 0175 should contain the 12-bit two's complement factors to be multiplied. After the subroutine is done, location 0176 should contain the high-order word and 0177 the low-order word of the product. Your multiplication routine should take both overflow and sign into account.
Assigned 9/19/03, due Wednesday 10/01/03. 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. Don't start this until we talk about it in class.
Assigned 9/19/03, due Friday 10/03/03. Write a PDP8 program that clears as much memory as possible, using no more than 100 (base ten) lines of code. 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?)
Assigned 10/3/03, due Wednesday 10/8/03. Do problems 3, 4, 5, 8, 13, 15, 18, 21, 22, 38, 39, and 41 from Chapter 2 of your textbook.
Assigned 10/22/03, due Monday 10/27/03. Do problems 4, 6, 12, and 16 from Appendix B. Also:
In assembly language, what's a macro?
What's the difference between an object module and an executable? Why do we need object modules?
Suppose you're programming in MIPS, and you write the instruction addi $3, $4, 99000. This poses a problem for the assembler. Why? Rather than just giving you an error message, what can the assembler turn this into? (Show your answer in both assembly language and machine language.)
Suppose you need to create a circuit with a 3-bit input and a 1-bit output. You want the output to be 0 when the input is 0, 3, or 4, and 1 when the input is 1, 2, or 5. If the input is 6 or 7, you don't care what the output is. Show how to derive the simplest circuit you can to satisfy these requirements, and then draw the circuit.
Design and draw a 1-bit 4-function ALU with the following specifications. The unit should have five input lines: (1) A, a data line, (2) B, another data line, (3) Cin, the carry-in for addition, and (4-5) S0 and S1, a pair of control lines that determine the operation performed by the ALU. There should be two output lines--the result R, and the carry-out Cout. R should depend on the input as follows:
S1 S0 R ============================ 0 0 A OR B 0 1 A AND B 1 0 A + B + Cin (where + is addition rather than OR) 1 1 NOT A
Assigned Wednesday, 10/29/03, due on paper at class time Monday, 11/03/03. Do problems 3, 7, 14, 15, 26, 27, and 44-48 from Chapter 4.
Also, imagine using the third version of the multiplication hardware (see Figure 4.31 on page 257) to multiply 1011011 by 11011. Show the contents of the Product register after iterations 1, 2, 3, 4, 5, 6, and 32.
These are the approximate dates (posted here at the beginning of the term), when these readings will become relevant. Use your judgement about when these readings are likely to fit into the class as the term goes on.