Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago