In: Computer Science
THE CODE IN THIS QUESTION IS STORED IN THE MEMORY FROM ADDRESS 0X1FFF000. SO TAKE THIS INTO CONSIDERATION.
1. In the following MIPS assembly code,
translate all the instructions to their corresponding machine code
in hexadecimal format. This code is stored in the memory from
address 0x1fff0000.
Loop: sw $t1, 4($s0)
addi $t1, $t1, -1
sll $t1, $t1, 2
bne $t1, $s5, Exit
addi $s0, $s0, 4
j Loop
Exit: …
********************************THE FOLLOWING QUESTION NEEDS TO BE CONVERTED TO MIPS ASSEMBLY LANGUAGE, WHERE i is stored in $s0 and the array is stored in $s1. ***********************************
2. Compile the following C code into MIPS:
i=0;
while (i<=100) do
A[4*i]=0;
where integer i is in register $s0 and the base memory address of array A is in$s1.