Question
MIPS Instructions 1. Provide the sequence (one or more) of MIPS instructions that performs: (Use assembly language NOT labels with branch instructions) a. increments register
MIPS Instructions
1. Provide the sequence (one or more) of MIPS instructions that performs: (Use assembly language NOT labels with branch instructions)
a. increments register $23 by 5000;
b. load register $23 with value -1000
c. put value 456 in a word at memory location 0x8004
d. increments a word in memory location 4000 by 0xCDE
e. x [10] = x [100] + x [101], assuming x [0] an integer at memory location 2000; Note x is an array of integers; C declaration: int x [200];
f. a = b * c, assuming a, b and c are integer variables in memory locations 3000, 3996 and 3992, respectively; C declarations: a, b, c;
g. x = y * w m assuming x, y and w are floating point variables in memory locations 8000, 7996 and 7992, respectively; C declarations: float x,y,z
h. if ( x => y) goto XYZ
Assume that variable x corresponds to word at memory address 0x1000, and variable y to word at memory address 0x70000. The instruction with label XYZ is after the branch instruction and there are 100 instructions between those two instructions.
i. if ( x
Assume that variable x corresponds to word at memory address 0x1000, and variable y to word at memory address 0x7000. The instruction at XYZ is before the branch instruction and there are 1000 instructions between those two instructions.
Problems a - i above are unrelated.
2. For the following MIPS code determine a bit pattern for each instruction.
XYZ: LW $8,30($2)
ADDI $2, $8, -7
DIV $2, $30
MFLO $2
BEQ $3, $5, ABC
ADDI $2, $8, -4
ABC:
SW $2, -2($5)
BNE $5, $7, XYZ
THIS IS MY ATTEMPT AT ANSWERING THE QUESTIONS. PLEASE REVIEW FOR ERRORS AND EXPLAIN WHAT AND WHY IS WRONG. Thanks!
23,6(sscoS , tL23 , Lew 23) (-ics c o) 806H YOOQ CDEStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started