Question: Analyze the following ARM Cortex MO+ Assembly code and answer the following questions: Label Instruction LDR R2, =G LDR RO, R2] CMP RO, #7 BNE

 Analyze the following ARM Cortex MO+ Assembly code and answer the

Analyze the following ARM Cortex MO+ Assembly code and answer the following questions: Label Instruction LDR R2, =G LDR RO, R2] CMP RO, #7 BNE NOTEQ BL GEqual7 B DONE 7 NOTEO BL GNotEqual7 B DONE 9 GEqual7 SUBS RI, RO, #0x6 BXLR 11 GNotEqual7 SUBS RI, RO, RO 12 BXLR 13 DONE NOP Instruction Address Ox118 Ox11A Ox11C Ox11E 0x120 Ox124 Ox126 Ox12A 0x12C Ox12E Ox130 Ox132 Ox134 10 1. Draw the flowchart that best represents the above code. 2. Assume G = 7. What are the values of the NZCV condition bits Instruction 3 is executed? 3. What is the value of register R1 when G = 7? 4. Assume G = 17. What are the values of the NZCV condition bits Instruction 3 is executed? 5. What is the value of register R1 when G = 17? 6. How many subroutines does this code have? 7. What value is contained in register LR when instruction 5 is executed? 8. What value is contained in register LR when instruction 7 is executed? 9. What value is contained in register PC when instruction 10 is executed? 10. What value is contained in register PC when instruction 12 is executed? 11. How is the size of the BL instruction? 12. How is the size of the BX instruction? 13. What is the total size (in bytes) of the above code? Analyze the following ARM Cortex MO+ Assembly code and answer the following questions: Label Instruction LDR R2, =G LDR RO, R2] CMP RO, #7 BNE NOTEQ BL GEqual7 B DONE 7 NOTEO BL GNotEqual7 B DONE 9 GEqual7 SUBS RI, RO, #0x6 BXLR 11 GNotEqual7 SUBS RI, RO, RO 12 BXLR 13 DONE NOP Instruction Address Ox118 Ox11A Ox11C Ox11E 0x120 Ox124 Ox126 Ox12A 0x12C Ox12E Ox130 Ox132 Ox134 10 1. Draw the flowchart that best represents the above code. 2. Assume G = 7. What are the values of the NZCV condition bits Instruction 3 is executed? 3. What is the value of register R1 when G = 7? 4. Assume G = 17. What are the values of the NZCV condition bits Instruction 3 is executed? 5. What is the value of register R1 when G = 17? 6. How many subroutines does this code have? 7. What value is contained in register LR when instruction 5 is executed? 8. What value is contained in register LR when instruction 7 is executed? 9. What value is contained in register PC when instruction 10 is executed? 10. What value is contained in register PC when instruction 12 is executed? 11. How is the size of the BL instruction? 12. How is the size of the BX instruction? 13. What is the total size (in bytes) of the above code

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 Databases Questions!