Question: 5. [Memory and data references] a) What's the difference between LI, LA, and LW? b) Translate C to AL (you will need LI, LA, and
![5. [Memory and data references] a) What's the difference between LI,](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3b68bb7ba1_01166f3b68b33300.jpg)
5. [Memory and data references] a) What's the difference between LI, LA, and LW? b) Translate C to AL (you will need LI, LA, and LW!). You do not need to give the assembly language declarations. int Vara, VarB, Varc; int *VarE, *Varf: int VarD = 10; int ArrayA[100); VarA = 20; VarB = VarA; Array,[1] = VarB; // careful with this one (from previous year's mid-term) VarF=&VarE; 6. [Loops] In class, we talked about two methods of doing data transfers using for loops, (i) computing the A[i] and B[i] every iteration and (ii) using pointers which were incremented every iteration. In this problem, code data transfer with a loop using a different variation: Use A and B in the displacement slot and use a register to be the offset. For example, your memory operands for SW and LW could be A($t0) and B($t0), respectively. Demonstrate with array A containing 6 words (e.g. 1,2,3,4,5,6), that are copied to array B. 5. [Memory and data references] a) What's the difference between LI, LA, and LW? b) Translate C to AL (you will need LI, LA, and LW!). You do not need to give the assembly language declarations. int Vara, VarB, Varc; int *VarE, *Varf: int VarD = 10; int ArrayA[100); VarA = 20; VarB = VarA; Array,[1] = VarB; // careful with this one (from previous year's mid-term) VarF=&VarE; 6. [Loops] In class, we talked about two methods of doing data transfers using for loops, (i) computing the A[i] and B[i] every iteration and (ii) using pointers which were incremented every iteration. In this problem, code data transfer with a loop using a different variation: Use A and B in the displacement slot and use a register to be the offset. For example, your memory operands for SW and LW could be A($t0) and B($t0), respectively. Demonstrate with array A containing 6 words (e.g. 1,2,3,4,5,6), that are copied to array B
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
