Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. (a) Examine the following ARM assembly program and determine the final values of registers RO, R1, R5, and R6 once the program counter reaches
2. (a) Examine the following ARM assembly program and determine the final values of registers RO, R1, R5, and R6 once the program counter reaches the stop label. Determine the status of the N, Z, C, and V flags at the end of the program. What is the size of the program code (including the data in the TABLE)? (12 marks) AREA Simpletask, CODE, READONLY ENTRY ADR RO, TABLE MOV R1, #Ox06 MOV R2, #0 MOV R6, #0 LDR R5. [RO], #4 SUBS R1, R1, #1 ADD R6, R6, RS BGT loop stop B Stop TABLE DCD Ox1234, 0x2233, OxAABB, 0xFFFF, 0x1222, 0x2266 END loop (b) For the following ARM assembly program, what are the final values of registers, ro, rl, r2, r3, and flags N, Z, C, V when stop label is reached? (8 marks) AREA Examquestion, CODE, READONLY INPUT: 10.11 OUTPUT: 12,13 ENTRY MOV TO, #10 MOV 11, #3 MOV 13, #0 SUBS 10, 10, 11 ADDGE 13, 13, #1 BGE loop ADD 12, 10, 11 B stop END loop stop 2. (a) Examine the following ARM assembly program and determine the final values of registers RO, R1, R5, and R6 once the program counter reaches the stop label. Determine the status of the N, Z, C, and V flags at the end of the program. What is the size of the program code (including the data in the TABLE)? (12 marks) AREA Simpletask, CODE, READONLY ENTRY ADR RO, TABLE MOV R1, #Ox06 MOV R2, #0 MOV R6, #0 LDR R5. [RO], #4 SUBS R1, R1, #1 ADD R6, R6, RS BGT loop stop B Stop TABLE DCD Ox1234, 0x2233, OxAABB, 0xFFFF, 0x1222, 0x2266 END loop (b) For the following ARM assembly program, what are the final values of registers, ro, rl, r2, r3, and flags N, Z, C, V when stop label is reached? (8 marks) AREA Examquestion, CODE, READONLY INPUT: 10.11 OUTPUT: 12,13 ENTRY MOV TO, #10 MOV 11, #3 MOV 13, #0 SUBS 10, 10, 11 ADDGE 13, 13, #1 BGE loop ADD 12, 10, 11 B stop END loop stop
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