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,

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!