Registers t1 has the base address of the given array and s0
Registers $t1 has the base address of the given array and $s0 is holding the value for variable y. A[500]= y+ A[200]; Compile the given array in C to MIPS Assembly language.
Solution
A[500]=y+A[200]
Below is the equivalent instruction of above line in assembly language
ADD $t1(500), $t0, $t1(200)
Here we are using add instruction to add $t0 which is holding the value of y and $t1(200) which is holding the value as A[200]
![Registers $t1 has the base address of the given array and $s0 is holding the value for variable y. A[500]= y+ A[200]; Compile the given array in C to MIPS Asse Registers $t1 has the base address of the given array and $s0 is holding the value for variable y. A[500]= y+ A[200]; Compile the given array in C to MIPS Asse](/WebImages/22/registers-t1-has-the-base-address-of-the-given-array-and-s0-1053542-1761549237-0.webp)