Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
UNDERGRADUATE COMPUTER SCIENCE LABORATORIES COMPUTER ORGANIZATION Semester : Spring 2009 Course : CS 33 Section : 2B Project Number : 1 and 4 UCLA ID : 803748940 Report Due Date : 05/13/2008 Experiment Date : 04/23/2008 Name : Yuanjia Wu Instructor : Dr. John A. Rohr TA : MK Suh
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Abstract The objectives of these two projects are to understand the data and instructions available at the computer machine level and to learn how to write a MIPS assembly language program in addition of using a SPIM simulator to run it. First of all, to achieve these purposes, a C++ program was written to generate digital controller instruction words as the design for an assembly language program; afterwards according to the C++ program, a MIPS assembly language program was written to perform the same function. Introduction A single, fixed-length instruction word which packs an operation code with one or more parameters is often used by digital computers and controllers. The instruction word consists of operation code as the most significant bits, followed by parameters in the successive bits of the word. Assembly language is used to write programs in terms of the basic operations of a processor. The benefits of understanding and writing assembly language code make new insights into how to write a more efficient, high-level language code, familiarizing with the task that compliers perform. SPIM is a simulator for the MIPS R2000/R3000. Projects Work For the C++ program, we need to divide the main program into two parts. The first part is obtaining the operation code. For the operation codes, there are three different scenarios, the first of which is the termination of the program when the operation code is less than zero. In the second scenario, when the operation code is greater than 15, it renders the operation code invalid. The last scenario contains 7 different cases when the operation code lies between 0 and 15. The
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/28/2009 for the course CS cs33 taught by Professor John during the Spring '09 term at UCLA.

Page1 / 5


This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online