The following codes are supposed to add ten Bytes stored in an array and store the sum in R4. However, there is an error. Which of the four choices pick up the bug? MOV r0, #10; load r0 with 10 MOV r4. #0 LDR, r1, = Array; load r1 with address Array loop LDRB r2, r1; load one byte to r2 ADD r4, r4, r2; r4 = r4 + r2 ADD r1, r1, #1; increase r1 by 1 SUBS r0, r0, #1; decrease r0 by 1 BNE loop a. BNE loop should be BEQ loop b. loop should not take one line by itself. c. MOV r0, #10 should be MOV r0, #A d. LDRB r2, r1 should be LDRB r2, [r1] Multiple loading and multiple storing instructions allow you to load or store multiple registers from or to memory. Which of the following instructions load r2 with the memory location [r0 + 4] a. LDMIA r2, {r1, r0, r4} b. STMIA r2, {r1, r0, r4}) c. STMIA r0, {r1, r2, r4} d. LDMIA r0, {r1, r2, r4} Let\'s assume r0, r1, r2,r3, r4, r5 and r6 have the contents of 0 times 90, 0 times 91, 0 times 92,.. and 0 times 96. After the following two stack operations, determine the content of r1. PUSH {r0, r2-r6} POP {r0-r5}. a. 0 times 91 b. 0 times 93 c. 0 times 90 d. 0 times 92 Solution Answers 4. Multiple loading and multiple storing instructions allow you to load multiple registers from memory. which of the following load r2 with the memory location r0+4. (b) STMA r2{r1,r0,r4} 5.Let’s assume r0,r1,r2,r3,r4,r5 and r6 have the contents of 0x90,0x91,…. and 0x96. After following two stack operations , determine the content of r1 (a) 0x91 .