Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Complete an ARM assembly program that will copy a block of data from one location to another one word at a time. For this program,
Complete an ARM assembly program that will copy a block of data from one location to another one word at a time. For this program, you must:
- Use all pointers
- You will be reading and/or writing each of the variables these pointers point to
- Copy each word-sized integer, except negative numbers, from the source block array (SBLK) to the destination block array (DBLK)
- Stop the transfer when SBLKENDPTR (source block end pointer) is reached
- Note: The placement of the SBLKPTR and SBLKENDPTR is very similar to the placement of iterators for a vector in C++
- Count the number of negative values in the source array (the number of integers that were not copied)
- The final count should be stored in the NUMNEG (number negative) variable
- Count the total number of values (zero and positive values) transferred
- The final count needs to be stored in the TOTAL variable
- Use at least one loop using conditional branch command(s)
What the results in memory should look like after correct execution:
Note: The exact address of the variables and arrays may be different, however, they must be RAM addresses (declared in the .data section)
NUMNEGPTR | 0x2000.0000 | 3 |
TOTALPTR | 0x2000.0004 | 4 |
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