Computer Organization and Programming
CS310 -- fall 97
-
Class Information
-
Handouts (copies of all handouts are in a wall-mounted bin outside
of my office, TAY 3.148)
-
Handout
#3 on 8/29 : encoding of data types
-
Handout #4 on 9/3: Program 1 specs, part1 (see below)
Handout #5 on 9/3: lecture notes (not online)
-
Handout #6 on 9/5: Program 1 specs, part2 (not online)
-
Handout
#7 on 9/7: Program 1 turn-in requirements
Handout
#8 on 9/7: lecture notes: finish memory, then algorithms for conversion
between encodings
-
Handout
#9 on 9/12: Two weeks plan.
-
Handt10
#10 on 9/12: Program 2 specification (see below).=>
Solution to Program 2
-
Handout
#11 on 9/12: Homework #1. => Solution
to HW#1
-
Handouts #12-16: Notes for lectures 7,8,9, and 11 (not online)
-
Handout
#17: More about test plan for assignment 2
-
Handout
#18: Homework #2. => Solution
to HW#2
-
Handout #19 on 9/29: Homework#2 reference sheet, plus example code (not
online)
-
Handout #20 on 10/1: Programming with arrays in asm. lang. (not online)
-
Handout #21 on 10/1: Homework#2 news posting, plus array examples (not
online)
-
Handout
#22: Exam #1 Objectives
-
Handout #23 on 10/6: A preview of the exam#1 reference card (not online)
-
Handout #24 on 10/8: Slides used in 10/6 and 10/8 lecture: Usage of Register
indirect with displacement; the LEA instruction (not online)
-
Handout #25 on 10/8: Discard: Replaced by Handout #28
-
Handout
#26: Discard original paper copy. Replaced with Handout #27 (changes
to handout #26 through 10/9 1p.m.)
-
Handout
#27: Homework #3 and Quick conversion from gRISC syntax to MIPS ISA
and UTPCSPIM syntax
-
Handout #28: Overview of the MIPS Instruction Set Architecture(not online)
-
Handout #29: Notes from 10/13 (not online): arithmetic on signed vs unsigned
integers; plus introduction to our "RISCi" computer organization (based
on section 9.1)
-
Handout
#30: Program #3 (due 10/20) More info at Assignments
=>
Solution to Program 3, Part 2

-
Handout
#31: Program #3 worksheet (due 10/20) More info at Assignments
-
Handout #32: Notes on PC relative addressing mode, plus the Register Transfer
Language for Branch (not online)
-
Handout #33: Exam 1 solutions and distribution (not online)
-
Handout
#34: Complete example of parameter passing using the stack and frame
pointer....following the text's generic stack frame
-
Handout
#35: Program #4: specification of the main function. See P4 solution
below!
-
Handout
#36: Program #4: specification of the functions; See P4 solution below!
-
Handout #37: A discussion of typical errors when passing parameters via
the stack. (not online)
-
Handout
#38: Team Exercise. Please work out all the problems by yourself before
checking the solutions
here.

-
Handout
# 39 on 10/31: Program 4 turn-in requirements. See P4 solution below!
-
Handout #40: Notes on exception handling: types, cpu timeline, exception
state in the hardware, and a depiction of a dispatch exception handler
(not online)
-
Handout #41: MIPS-specific exception handling (not online)
-
Handout
# 42: Exam 2 Objectives

-
Handout #43, 44: (not online) Input/Output: Organization, Basic controller
functionality, The basic functions for all application I/O: get_character
and put_character. How to write these functions using Programmed I/O (i.e.
by "polling" a status bit in a "busy-wait" loop).
-
Handout #45: (not online) How to write a character-output device driver.
-
Handout #46: How to write a character-input device
driver.
-
Handout #47: trap.handler for Program5 (Note:
it has been modified as of 11/19/97 6p.m.)
-
Handout #48: (not online) Program 5 Specifications #1 of 3
-
Handout #49: (not online) Slides for lecture #35 on DMA and disks
-
Handout #50: (not online) Program 5 Specifications #2 of 3
-
Handout #51: Program 5, application
code that you are to use for Part 2. (as of 11/23/97 4p.m.)
-
Handout #52: Program 5 Specifications #3 of 3
-
Handout #53: Program 5, application
code that you are to use for Part 3. (as of 11/20/97 8p.m.)
-
Handout #54: (not online) Slides on a subset of the cache lectures
-
Handout #55: (not online) Exam 2 Solutions
-
Handout #56: Program 5 TURN IN SPECS
-
Handout #57: (not online) Floating point data type slides
-
Handout #58: (not online) Floating point data type cont.
-
Handout #59: (not online) Slides on Linking
-
Handout #60: (not online) Slides on Loading and Translation(Assembly)
-
Handout #61: Final EXAM Objectives
-
Reading in Text
-
Chapter 1 through pg 19, Example 1.31(pg 26)
-
Chapter 3 3.1(except 3.1.3 and banks on page 82), 3.2(except pg
90,93-94), figure 3.17
-
Chapter 4 the entire chapter (except for: 2ndhalf of pg128-pg129,
4.5.7, 4.6.2)
-
Chapter 5 through pg 177, Example 5.19 (pg 186)
-
Chapter 5 pp178-180, 5.2.3, 5.2.4 (only on "representing strings"
and example 5.19), 5.3, 5.5
(on indexed usage, displacement usage, string concepts, and the section
on LEA)
-
Chapter 7 pg 250 on unsigned overflow for addition, pg 268-270 ("addition
and subtraction in 2's complement")
-
Chapter 9 9.1 (back to computer organization)
-
Chapter 6 Chapter 6 through 6.5 (for lectures 22-24), see Chapter
6 examples recoded in MIPS (UT's PCSPIM specific)
-
Chapter 11 Skim 11.1, focusing on 11.3, the Processor Status Word
concept, and the difference between XOPs and Subroutines. Note:
the MIPS syscall instruction is an example of an XOP. Main-reading
is 11.3 (except 11.3.5)
-
Chapter 3 3.3
-
Chapter 12 12.1 (except 12.1.3), 12.2, 12.4(first 2 pages)
-
PCSPIM User's Manual Chapter 14
-
A new trap.handler file to use with program #5: final
version 11/19/97 6p.m.
-
Chapter 9 9.2 (on caches)
-
Chapter 8 8.2 (on floating point data type - focus on IEEE 754 format)
-
Chapter 1 1.1.6 converting decimal fractions to binary
-
Chapter 7 7.2.2 excess "n" signed integer scheme
-
Programming Assignments
-
Program
1(Handout #4) -- Simple Assembler/Loader and Simple Implementation.
Two source files for you to use however you wish: C++
file and PASCAL
file .
9/4/97 News: ooops, the C++ file was missing decode(). Here's the C++
decode function.
Handout #6 on 9/5: Program 1 specs, part2 (not online)
Handout
#7 on 9/7: Program 1 turn-in requirements
Solution
to program 1
-
Program
2(Handout #10)
Handout
#17 -> Additional information about the test plan.
Solution
to Program 2
-
Program 3:
Handout
#30: specifications
For part 1: Use this working,
correct source file (based on Example 5.19 from the text).
Part
1 Worksheet (handout #31) => No solution to be posted for this.
Solution
to Program 3, Part 2
-
Program 4:
Handout
#35: Program #4: specification of the main function
Handout
#36 Program #4: specification of the functions plus an example
Some
clarifications about Program #4.
Announcement:
about $sp and $fp
Turn-in
requirements:: Handout #39: Program 4 turn-in requirements
Solution
to Program 4
-
Program 5:
See handouts 48 and 50 (not online) for program 5 specifications #1
of 3, and #2 of 3.
Handout #52: Program 5 Specifications #3 of 3
The
P5 trap.handler file that you must use for Program 5 parts 1, 2, and
3. (Current version is of 11/19/97 6p.m.)
I am providing you with Program 5's part2 application, see handout
#51: online copy. (11/23/97 4p.m.)
Handout #53: Program 5, application
code that you are to use for Part 3. (as of 11/20/97 8p.m.)
Handout #56: Program 5 TURN IN SPECS
NEWS:
-
Part 4 of Program 5 is now extra credit. You can get 20% extra credit for
Part4. All you need to do is write the solution and prove that it assembles
correctly. See handout #52
-
Part 1's exception number was wrong: The store address error for
unaligned addresses is #5 (not 6).
-
You must understand HOW your exception handler (e.g. in Part2) is being
"called" from the P5excp.handler!!!!!!
This understanding will determine how you should RETURN!!!! from your
exception handler. An appreciative student also echoes his endorsement
of this and said "oh I didn't realize that I really needed to read the
P5excp.handler" code.
Inotherwords, your P5 code has to INTERFACE to the caller in the P5excp.
handler... i.e. they need to work together.
- For parts 2 and 3 Please add your new code at the END of the file,
after all of the given code. In the few places you have to add code to
the given routines (main and others), clearly indicate with *** and comments
where and what your modifications are.
-
Newsgroup : utexas.class.cs310
Simulator:
CS310 assembly language programming assignments are in the MIPS Instruction
Set Architecture, and are executed using a PC-based simulator of the MIPS
ISA called PCSPIM, written (and copyrighted) by James Larus, University
of Wisconsin, with additional copyrights by Morgan Kaufmann. CS310 uses
a unique version of PCSPIM. This version of PCSPIM, nicknamed UT's PCSPIM,
provides several additional features for CS310 students (or any user who
would like to see symbol tables, complete listing files, use pushw/popw,
etc.). See the UT
PCSPIM web page for an executable file, with bug lists, template
file, installation instructions, news, examples
and the "exam2 reference card".
The company MIPS is now owned by Silicon
Graphics Incorporated.
Resources:
This page
was last modified on Nov. 30, 1997 by all of the CS310 team.