CS 341: Introduction to Computing Systems

Spring 2000

Last modified: April 18, 2000 7:25 pm

Instructor: Maccabe

Office

EECE 236B

Phone

277-6504

Office Hours

T 10-12:30; Th 11-1:30; and by appointment

Class Meetings

T Th 2-3:15; Tapy 201

Textbook

Computer Systems: Architecture, Organization, and Programming by Maccabe, McGraw-Hill, 1993.

Grading

Programming

40%

Homework

20%

Exams

35%

Quizes

5%

Class Meetings

Dates

Topic

Reading

Notes (ps)

Notes (pdf)

1/18

Introduction

 

 

 

1/20-1/27

Components

Chapter 3

Notes

Bus

Notes

Bus

2/1-2/8

Calculations

Chapter 4

Notes

Addrs

Notes

Addrs

2/10-2/17

Data Organization

Chapter 5

Notes

Notes

2/22-2/29

Procedure Calls

Chapter 6

Notes

Notes

3/2-3/7

Integer Representation

Chapter 7

 

 

3/9

Midterm Exam

 

 

 

3/21-3/23

Floating Point Representation

Chapter 8

 

 

3/28-3/30

Translation

Chapter 10

 

 

4/4-4/6

Extended Operations and Exceptions

Chapter 11

 

 

4/11-4/18

Devices and Interrupts

Chapter 12

 

 

4/20

Midterm Exam

 

 

 

4/25-4/27

Instruction Interpretation

Chapter 9

 

 

5/2-5/4

Review

 

 

 

5/9

Final Exam 12:30-2:30pm

 

 

 

 

Homework Assignments

Assignment

Assign Date

Due Date

Solution

Chapter 3: 2, 3, 5, 8, 9, 10, 14a, 16, 17, 23

1/27/00

2/10/00

 

Chapter 4: 1aa, 1ab, 1ac, 1ad, 1ba, 1bb, 1bc, 1bd, 3 (using SPARC code), 8a, 8d (SPARC code), 9a, 9d (SPARC code), 12, 14

2/15/00

2/29/00

 

Chapter 7: 1, 6, 9, 11, 19, 22

3/29/00

4/11/00

solution

Chapter 8: 1, 9, 11, 15

4/6/00

4/18/00

solution

Chapter 10: 3, 10, 11, 13, 14

4/6/00

4/18/00

solution

 

Programming Assignments

Assignment

Assign Date

Due Date

Assignment 1: Lab 2 exercise 2

2/11/00

2/22/00

Assignment 2: Lab 3 exercise 4

2/11/00

2/29/00

Assignment 3: Write a SPARC program that will read a numeric value from the console and print `Y' if the number is prime, and `N' otherwise

2/15/00

3/7/00

Assignment 4: The purpose of this program is to implement a simple array, and in so doing, to use the appropriate address calculations..

Input: The user enters two lists of non-negative integers. The first list is just data - data in the array. The second list represents a list of queries, each specifying an index into the data array (the first list), starting with index 0.

Output: The program must give back the query results, i.e. the

values in the data array associated with each index of the second list.

Odds and ends:

1. limit the data array to 20 values max (all non-negative)

2. ffffffff will be the delimiter between the lists

3. appropriate error messages should be given for error conditions, such as too many values, invalid index, etc.

4. input hex values using 'ta 4' and 'ta 5'

 

Example "session":

input: 0 5 10 15 20 ffffffff 4 1 2 2 0

output: 20 5 10 10 0

3/29/00

4/10/00

Assignment 5: The purpose of this assignment is to gain some experience in implementing recursive functions.

For each of the following functions, write a recursive SPARC function that implements the desired behavior. Your main program should read the input, call the recursive function, and print the result (all input and output should be in hex).

1. digitsum is a function that retures the sum of the (base 10) digits in its argument.

2. For n>0, T(n) = 2T(n/2) + T(n-2); T(0) = 1; T(1) = 1.

3/29/00

4/17/00

Assignment 6: Drunken walk

The 512x512 GX device can be partitioned into 64x64 squares that are 8x8 pixels each. The program you write will start by drawing a cursor, representing the walker, into one of these locations (selected randomly). Then, the cursor moves in one of eight possible directions (up, down, left, right, and the 4 diagonals) also selected randomly. This continues indefinitely. A trail is left where the drunken walker has been (not just erased). The cursor can go anywhere even going over the trail; but if it goes past the top, it should wraparound on the bottom. Wraparound going the other way and for the

left-right direction should also be allowed.

 

Requirements:

  • You are required to implement the drawing operations as traps which you will write: one for the blit operation and one for drawing a line. What to draw for the cursor (walker) and the trail is up to you, but they should be distinct.
  • You should only use leaf procedures (this will be important for the next assignment). No stacks, stack frames, or register windows!

 

We will provide code for a pseudo-random number generator written in C which you can convert into a SPARC leaf function.

 

 

4/18/00

5/2/00

Assignment 7: Threads

 

 

5/9/00

Students