Question: Given the code below, a) Indicate in one line what the elephant function does b) What will be the value returned by the elephant function
Given the code below,
a) Indicate in one line what the elephant function does
b) What will be the value returned by the elephant function
.section .data NUMBERS: .word 9 . word 4 .word 15 .word 6 .word 3 . section .txt elephant: lui to, %hi(NUMBERS) addi te, t0, %lo(NUMBERS) addi t1, zero, 5 addi t2, zero, 0 avocado: t3, 0(t0) andi t4, t3, 1 beg t4, zero, grape add t2, t2, t3 lw grape: addi t0, t0, 4 addi t1, t1, -1 bne t1, zero, avocado add a, zero, t2 ret
Step by Step Solution
3.45 Rating (158 Votes )
There are 3 Steps involved in it
aThe elephant function is nothing but the programming language which takes the frequency ... View full answer
Get step-by-step solutions from verified subject matter experts
