Question: Please asap Addressing arrays -Exercise C code: A[5j]=A[4k] - Variable j is stored in register x, variable k is stored in 6, address of array
Addressing arrays -Exercise C code: A[5j]=A[4k] - Variable j is stored in register x, variable k is stored in 6, address of array A in 12 - The contents of x5 is 3 and the context of x6 is 4 . The size of each element of Array A is 4 bytes. - Write the RISC-V code (in simple instructions, such as: add, ld, sd.). Until this point you do not have to use the information about the exact values for j and k and you should not. Also you do not yet need to use the memory image below. To handle the answer in assembly you need to study the slides on Id, sd, and array manipulation, offset, base, array index with known value, array index with unknown value. - Extra: now change the contents of only those 4 bytes of memory that are affected (because we are copying one array element from memory to another). The rest of memory remains the same. Remember that array elements are stored in consecutive bytes in memory starting from the base and there are no holes. Memory is indexed from right to left
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
