B.21, B.22, 2.12, 2.16, 2.17, 2.43
TA (Y. Wu, email@example.com), office hour 10-11, Friday, 9/21, drop in centre, first floor of ITC.
COD2e: 3.2, 3.13, 4.13, 4.17, 4.23
TA (X. Wang, firstname.lastname@example.org)
TA (Y. Wu, email@example.com), office hour 10:30-11:30, Friday, 10/12, drop in centre, first floor of ITC.
First read Tail Recursion on page 204. In class, we presented a recursive version of factorial. In this assignment, you write a tail recursive version of MIPS assembly code for factorial.
Include a C code, similar to that on page 204, in comments. The interface should be similar to that of the recursive version presented in class. Your code should follow the register convention to reduce memory accesses. Your program should be well documented.
The simulator xspim is vailable on our system. A.9 explains how to get started with the simulator.
Submission. Please electronically mail your assignments to the account: firstname.lastname@example.org
and include your name and student number at the beginning of the program:
# # LastName, FirstName 1234567 # CS3MG3 Programming Assignment, Oct. 2001 #
COD2e: 4.31, 4.53, 4.56, 5.6, C.2
TA (Y. Zhang, email@example.com), office hour 11:30-12:30, Friday, 11/16, drop in centre, first floor of ITC
COD2e: 6.8, 6.15, 6.28, 6.30 (Assuming $s1 is initially 8n, branch resolution is completed in the MEM stage. Note that the original code is on page 513.)
TA (X. Wang, wangxj@cas), office hour 1:30-2:30, Thursday, 11/22, drop in centre, first floor of ITC