Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Section B - ARM Assembly Language (25 marks) An ARM instruction set summary is provided at the end of this paper. 1. (5 marks) In

image text in transcribed

Section B - ARM Assembly Language (25 marks) An ARM instruction set summary is provided at the end of this paper. 1. (5 marks) In a little-endian system, 32-bit value 0x12345678 is stored in memory location 0x40000000. In a table, with a "memory location" column and a "stored data column, show what byte values are stored at each memory location. 2. (10 marks) The following is the assembly language translation of a C function. mystery: mov r3, r0 mov r0, #0 .L3: ldrb r2, [r3, #1] ! crip r2, r1 bhi .L4 add ro, r0, #1 b .L3 .L4: bx lr CC1306 Semester 1 - 2016 Page 3 of 25 Annotate each line of the function with comments to explain what each line does. Write an equivalent C function and explain what it does. 3. (5 marks) Give a single assembly language instruction which will clear bits 4 to 7 of the r2 register. 4. (5 marks) Give a single assembly language instruction which will load the negated value of r2 into r1 only if flag Vis set. Section B - ARM Assembly Language (25 marks) An ARM instruction set summary is provided at the end of this paper. 1. (5 marks) In a little-endian system, 32-bit value 0x12345678 is stored in memory location 0x40000000. In a table, with a "memory location" column and a "stored data column, show what byte values are stored at each memory location. 2. (10 marks) The following is the assembly language translation of a C function. mystery: mov r3, r0 mov r0, #0 .L3: ldrb r2, [r3, #1] ! crip r2, r1 bhi .L4 add ro, r0, #1 b .L3 .L4: bx lr CC1306 Semester 1 - 2016 Page 3 of 25 Annotate each line of the function with comments to explain what each line does. Write an equivalent C function and explain what it does. 3. (5 marks) Give a single assembly language instruction which will clear bits 4 to 7 of the r2 register. 4. (5 marks) Give a single assembly language instruction which will load the negated value of r2 into r1 only if flag Vis set

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

Primary English Audit And Test Assessing Your Knowledge And Understanding

Authors: Doreen Challen

2nd Edition

190330086X, 978-1903300862

More Books

Students also viewed these Accounting questions

Question

D How will your group react to this revelation?

Answered: 1 week ago