Question: Program 3 : Copy an array to another In the data section 1 . Define two arrays called Array 1 and Array 2 . Each
Program : Copy an array to another
In the data section
Define two arrays called Array and Array Each array has three elements and each
element is a word. Initialize Array with xAAAAAAAA, xBBBBBBBB and
xCCCCCCCC and initialize Array with zeros.
Use this for Code region
Write a program to copy Array to Array using postIndex addressing mode
You need to use two pointers; one for each array, eg r and r
Initialize the two pointers so that r points at the beginning of Array and r points
at the beginning of Array
Read a word from the location pointed by r and copy it in another register eg
r
Copy r to the location pointed by r
Update r and r to point at the next elements in the arrays
Repeat steps to copy element
Repeat steps to copy element
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
