Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. What values are stored in r0, r1, r4, and r6 after the followinginstructions

ID: 3608626 • Letter: 1

Question

1. What values are stored in r0, r1, r4, and r6 after the followinginstructions have executed?

Assume that r0, r1, r4, and r6 contain 0x00000027, 0x00000006,0x00000010 and

0xFFFFFFFF respectively. Be sure to list r0, r1, r4, and r6 in youranswer, even if some

values are unchanged.

   ADD r0, r0, r1

   SUB r0, r0, #31

   ADD r1, r4, r6


3. What values are stored in r0 and r9 after the followinginstructions have executed? Assume

that r0 and r9 contain 0xF1E92615 and 0xAC019356 respectively. Besure to list both r0

and r9 in your answer, even if some values are unchanged.

  MVN r0, #18

  AND r0, r9, r0


4. Use and example to show why the ARM assembly languageinstruction

MOV r0, r0, LSR #4 does NOT perform the integer division of r0 by16 when r0

initially contains -1424. How should this instruction be modifiedto perform the operation

described above?

Explanation / Answer

1. What values are stored in r0, r1, r4, and r6 after the followinginstructions