CMPE200 work 2 (1)

CMPE200 work 2 (1) - CMPE 200 HW #2 MIPS Programming Stack...

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

View Full Document Right Arrow Icon
CMPE200 ©Donald Hung 2010 1 CMPE 200 HW #2 MIPS Programming – Stack and Recursive Procedure Department of Computer Engineering, San Jose State University Dr. Donald Hung _______________________________________________________________________ Description: Write MIPS assembly code to build a 50-entry array with the base address 0x100. You need to access the array to perform some arithmetic calculations, and the resultant value of the calculation will be used as the input (argument) to the factorial function, which also needs to be programmed in MIPS assembly. Use this assignment to familiarize yourself with the MIPS ISA and its support to array, stack, procedure (and recursive procedure), as well as the basic techniques in MIPS assembly programming and testing. Tasks: 1) Write a MIPS assembly program to perform arithmetic expressions and compute factorial using recursive procedure. The C++ pseudo code is given below: void main() { int n, f; int my_array[50]; //Create the array for
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

CMPE200 work 2 (1) - CMPE 200 HW #2 MIPS Programming Stack...

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

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