Answered step by step
Verified Expert Solution
Question
1 Approved Answer
10. (25 points) Consider the following ARM program. Trace the values of the registers shown change during program execution. Also, trace the writes to memory
10. (25 points) Consider the following ARM program. Trace the values of the registers shown change during program execution. Also, trace the writes to memory by the STR instructions. There may be unused columns or rows in the tables. If you need to add columns or rows, you may do so. DCD 1 reserves one word of storage and sets it equal to 1. SPACE 3 reserves of memory but does not give those bytes a value. 3 bytes AREA COUNT_ONES BITO MASK, CODE, READONLY ENTRY LDR rl, num LDR r3, mask SUB r2, r2, r2 SUB r5, r5, r5 MOVS rl, rl BEQ store next ANDS r4, rl, r3 ADD r5, r5, 1 BEQ shift ADD r2, r2, 1 shift MOVS r1,r1, LSR #1 BNE next store STR r2, count r5, bits done STR done B count SPACE 4 bits SPACE 4 num DCD 2341 mask DCD 1 END r0 r1 r2 r3 r5 Results of the STR instruction Memory Contents Address
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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