Programming Assignment 1
Date Issued: Thursday, February 7, 2002
Date Due: Monday, February 18, 2002
Objectives:
At the end of this assignment, you should be able to
1: Understand the basic process by
which assembly-language programs are written
2: Understand simple assembler directives,
as they apply to the tkisem assembler
3: Understand the basic architecture
of the SPARC.
4: Be able to write and debug a simple
assembly-language program for a SPARC.
Rationale:
It is important that you see a real processor rather than the simplified processors we start with in class. You should be familiar with the instruction-level architecture (and its programming) of at least one RISC-based machine. The pedagogical goal of this assignment is to make you familiar with the basic structure of the SPARC architecture and how assembly-language programs are written. However, since CSE241 is not an assembly-language programming course, you must recognize that the level of assembly-language programming you are being exposed to here is very superficial.
Later in the course we will return to the SPARC architecture as our primary in-class example of a RISC-based architecture.
Assignment:
1: Read and understand Lab. 1 in the Laboratory Manual.
2: Enter, assemble, link and run (using tkisem) the test
code (Figure 1.1) of Lab 1. Ensure that you are comfortable using the assembler,
linker and tkisem GUI interface before proceeding further.
It is likely that all of the time-consuming problems you will encounter will be at this stage; incorrect paths, incorrectly installed tcl (wish41), incorrectly installed tkisem. The personnel in the Learning Center can usually help you out with these system problems.
3: Perform Exercises 1.6.1, 1.6.4 and 1.6.5 (i.e., Section 1.6 Exercises 1, 4 and 5).
4: Read and understand Lab. 2 in the Laboratory Manual.
5: Perform Exercises 2.6.1, 2.6.2 (Section 2.6, Exercises 1 and 2).
6: Read and understand Lab. 3 in the Laboratory Manual.
7: Perform Exercises 3.6.1, 3.6.4 (Section 3.6, Exercises 1 and 4).
Submission
Submit a writeup which contains, for each exercise (parts 3,5 and 7 above):-
1: The written material requested in the exercise.
2: A listing of your code. Comment your code using the models in the Laboratory Manual.
3: Screen shots of the registers BEFORE the code is run and AFTER the code terminates.
Hand in your writeup to your TA during lab on the due
date.