Translate to MIPS
- by user2334400
HELP Translate
A[i] = B[i-1] + B[i] + B[i+1]
to MIPS
the address of array A is $s1
the address of array B is $s2
the value of i is $s3
lb $s1,0($s3) # $s1=A[i]
lb $s2,0($s3) # $s2=B[i]
sb $s2,0($s3) # store s2
add $t0, $zero, $s2 #t0=B[i]
addi $s3,$s3,-1 #i=i-1
lb $s2 0($s3) #$s2=B[i-1]
add $t1,$zero,$s2 …