Help me solve this in MIPS Assembly Load/Sto, Arrays in MIPS Assembly 1. Sum of
ID: 3719576 • Letter: H
Question
Help me solve this in MIPS Assembly
Load/Sto, Arrays in MIPS Assembly 1. Sum of three integers stored in the memory (like in the lecture.. (a) Specify memory location using: la ] (b) Load immediate Integer-1 to register: [ St1] (c) Load immediate Integer-2 to register: [ St2] (d) Load Immediate Integer-3 to register: $t3] (e) Store Integer-1 to Memory (f) Store Integer-2 to Memory (g) Store Integer-3 to Memory (h) Load Integer-1 from memory to Register: $t4] (i) Load Integer-1 from memory to Register: St5] G) Load Integer-1 from memory to Register: St6] (k) add: Integer-1 Integer-2 Integer-3: t7 (1) Store the result of the addition again to memory (m) Load the result of the addition to register: [ St8 ] (DONE) In the report also iclude the appropriate screenshot 2. Sum of vector (array) elements Create, in the memory, the following three-integer array: Array(3)3 (a) Add the three-integers of the Array(3) (b) Print (console) the result of the addition In the report also include the appropriate screenshotExplanation / Answer
Solution:
Note: The first four subparts have been answered as per Chegg guidelines, please repost others.
1)
a)
b)
li $t0, 1
c)
li $t1, 2
d)
li $t3, 3
e)
sw $t0, 0($gp)
f)
sw $t1, 1($gp)?
g)
sw $t3, 2($gp)
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.