Question: LDUR and STUR. Given an array of four integers, write a program that populates a new array with the square of the elements in the

LDUR and STUR.
Given an array of four integers, write a program that populates a new array with the square of the elements in the given array. Assume X19 stores the memory location of the first element of the given array, and X20 stores the memory location of the first element of the new array.
Hint: Each memory address is incremented by 8 due to the doubleword addresses.
Ex: If X19 and X20 are initialized in the simulator as 4000 and 5000, and the content of the given array is:
Address Data
40001
40082
40163
40244
then the content of the new array is:
Address Data
50001
50084
50169
502416
The compiler will not accept any lines of code that has MOV or CMP.

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 Programming Questions!