Description
1. The MIPS processor has 32 general purpose 32-bit registers, referenced as $0 .. $31. Some of these registers are intended to be used in particular ways by programmers and by the system. For each of the registers below, give their symbolic name and describe their intended use:
a. $0
b. $1
c. $2
d. $4
e. $8
f. $16
g. $26
h. $29
i. $31
2. Translate this C program to MIPS assembler
Store variable x in register $t0 and store variable y in register $t1.
3. Translate this C program so it uses goto rather than if/else.
Then translate it to MIPS assembler.
4. Translate this C program so it uses goto rather than if/else.
Then translate it to MIPS assembler.
Consider this alternate version of the above program, use its approach to produce simpler MIPS assembler.
5. Translate this C program so it uses goto rather than if/else.
Then translate it to MIPS assembler.
6. Translate this C program so it uses goto rather than if/else.
Then translate it to MIPS assembler.
7. Translate this C program so it uses goto rather than if/else.
Then translate it to MIPS assembler.
For all enquiries, please email the class account at cs1521@cse.unsw.edu.au
CRICOS Provider 00098G
https://cgi.cse.unsw.edu.au/~cs1521/20T2/tut/04/questions 2/2
Reviews
There are no reviews yet.