Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 0 . 4 LAB: Array of squares - LDUR / STUR Given an array of four integers, write a program that populates a new
LAB: Array of squares LDURSTUR
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 X stores the memory location of the first element of the given array, and X stores the memory location of the first element of the new array.
Hint: Each memory address is incremented by due to the doubleword addresses.
Ex: If X and X are initialized in the simulator as and and the content of the given array is:
Addresses Data
then the content of the new array is:
Addresses Data
Note: Use the button under the Registers and Memory display to initialize X X and the four memory locations of the given array.
The loops is not stopping. Please help me fix it:
ACTIVITY
: LAB: Array of squares LDURSTUR
Load defa
Assembly
Line LOOP:
Line LDUR XX #
Line MUL X X X
Line STUR XX #
Line ADDI X X #
Line ADDI X X #
Line SUBI X X #
Line CBNZ X LOOP
Line Loop:
Registers
Each has value
Each has value
STEP
RUN
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started