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 0x1234, 0x2233, OxAABB. OxFFFF, Ox1222, 0x2266 END loop (b) For the following ARM assembly program, what are the final values of registers, r0, r1, 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 10, #10 MOV 11, #3 MOV 13, #0 SUBS 10, 10, r1 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 0x1234, 0x2233, OxAABB. OxFFFF, Ox1222, 0x2266 END loop (b) For the following ARM assembly program, what are the final values of registers, r0, r1, 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 10, #10 MOV 11, #3 MOV 13, #0 SUBS 10, 10, r1 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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

LO1 Understand human resource management and define human capital.

Answered: 1 week ago