Answer
4) Assembly code
li $2,8 # load value in j 0x8
sb $2,0($fp)
.L2:
lbu $3,1($fp)
lbu $2,2($fp)
addu $2,$3,$2
sb $2,1($fp)
lbu $2,0($fp)
addiu $2,$2,1
OR
OR
Answer
4) Assembly code
li $2,8 # load value in j 0x8
sb $2,0($fp)
.L2:
lbu $3,1($fp)
lbu $2,2($fp)
addu $2,$3,$2
sb $2,1($fp)
lbu $2,0($fp)
addiu $2,$2,1