Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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;
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions