Question: 1 - Write and debug the code given below. LDR R 2 , = 0 0 0 1 E 8 4 8 0 ; LDR

1- Write and debug the code given below.
LDR R2,=0001E8480;
LDR RO,=0xFFEEDDC;
STR R0,[R2];
As you finished debugging last instruction, open the "Memory" window in KEIL uVision IDE by
clicking on tab "Memory 1" as shown in Figure 1 below. Type the memory address stored in
R2 in the "Address" bar of "Memory" window. Can you observe the data in R0 at address
Ox001E8480? If not why?
Figure 1: Screenshot of KEIL uVision IDE with "Memory" window at the bottom right corner.
2- Modify the code given in question 1) such that the address stored in R2 becomes
0x20000000. Save, build and debug the code again. As you finished debugging last
instruction, open the "Memory" window in KEIL uVision IDE by clicking on tab "Memory 1" as
shown in Figure 1. Type the memory address stored in R2 in the "Address" bar of "Memory"
window. Can you observe the data stored in R0 now at address 020000000? If yes, explain
why data can be stored in memory now but not in question 1? Content of which addresses
have changed in memory? Can you show that ARM processor use little endian format?
3- Add the instructions given below to the code written in question 2. Save, build and debug the
code. As you finished debugging last instruction, check the content of register R1. Is this the
result you expected? Explain your answer.
LDR R 2,=020000001;
LDR R1,[R2];
NOP
4- Add the instructions given below to the code written in question 3. Save, build and debug the
code. As you finished debugging last instruction, open the "Memory" window in KEIL uVision
IDE by clicking on tab "Memory 1" as shown in Figure 1. Type the memory address stored in
register SP (Stack Pointer) in the "Address" bar of "Memory" window. Can you observe the
data stored in Stack? Write each data byte and the corresponding the address of each byte
stored in Stack. How does the value in register R1 is stored in Stack using little endian
format?
PUSH[RO);
NOP;
 1- Write and debug the code given below. LDR R2,=0001E8480; LDR

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!