Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Here is my code .data A: .word 10, 160, 20, 70,60,140,150,80,90,100,110,30,40,12

ID: 3600891 • Letter: H

Question

Here is my code

.data

A: .word 10, 160, 20, 70,60,140,150,80,90,100,110,30,40,120,130,50
Asize: .word 10
ShiftAmount: .word 4


minValue .word "Minimum Value: "
maxValue .word " Maximum Value:"
values .word " Values divisible by 4:"

.text
main:

la $a0, A
la $a1, N

jal MaxMin

MaxMin:
lw $t0, 0($a)

swap:
move $t0, $s0
move $s0, $s1
move $s0, $t0

Write a MIPS code that finds the minimum, maximum, sum and average of an array A. In your code, you need to load array A base address in the $s1 register. Once your code completes its easters r especively,maimum sum and average will be siored in $s2, ss3. 5s4 and 5s5

Explanation / Answer

.data

A: .word 10, 160, 20, 70,60,140,150,80,90,100,110,30,40,120,130,50
Asize: .word 10
ShiftAmount: .word 4


minValue .word "Minimum Value: "
maxValue .word " Maximum Value:"
values .word " Values divisible by 4:"

.text
main:

la $a0, A
la $a1, N

jal MaxMin

MaxMin:
lw $t0, 0($a)

swap:
move $t0, $s0
move $s0, $s1
move $s0, $t0

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote