1. Engineering
  2. Computer Science
  3. q2 translate the following c code to armv7m assembly code...

Question: q2 translate the following c code to armv7m assembly code...

Question details

Q2: Translate the following C code to ARMv7-M assembly code. Use a minimum number of instructions. Assume that the values of a, b, i, and j are in registers rO, r1, r4, and r5, respectively. Also assume that register r2 holds the base address of the array D. for(i-0: i<a; i++)

Q3: How many ARMv7-M instructions does it take to implement the C code from Q2? If the variables a and b are initialized to 10 and 1 and all elements of D are initially 0, what is the total number of ARMv7 M instructions that is executed to complete the loop?

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution