Question: 3. Add comments to the following MIPs code and briefly describe the function of this code fragment. (Base addresses of x[ ] and yI] are
3. Add comments to the following MIPs code and briefly describe the function of this code fragment. (Base addresses of x[ ] and yI] are found in Sa0 and Sal. lb and sb are load and store byte instructions). (15 pts) String Copy: addi $sp, $sp, -4 al byte instructions). p $s0, 0(Ssp) $s0, Szero, Szero sw add Ll: add Stl, $s0, Sal lb $t2, 0(Stl) add $t3, $s0, $a0 sb $12, 0(St3) beq $t12, Szero, L2 addi $s0, Ss0, 1 Ll $s0, 0($sp) lw addi Ssp, $sp, 4 jr Sra L2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
