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

 Section B - ARM Assembly Language (25 marks) An ARM instruction

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!