Below is a program block written in ARM Assembly. Since initially PC = 0x2000, Stack pointer sp = 0x400 (no data in the stack memory and shown next), what are the LR and SP values ​​when PC = 0x2028

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Below is a program block written in ARM Assembly. Since initially PC = 0x2000, Stack pointer sp = 0x400 (no data in the stack memory and shown next), what are the LR and SP values ​​when PC = 0x2028 (when the corresponding row is executed)?

 

A. LR = 0x2048,
SP = 0x3F0
 
B. LR = 0x201C,
SP = 0x3F4
 
C. LR = 0x202C,
SP = 0x408
 
D. LR = 0x2008,
SP = 0x3F8
 
E. LR = 0x201C,
SP = 0x404
Memory
Program (Instructions)
Address
Stack Me mory
Ox 400
OX3FC
0X3F8
OX3F4
OX3F0
OX3EC
OX3E8
0X3E4
OX3E0
OX3DC
0X3D8
OX3D4
OX3D0
OX3CC
Ox3C8
Ox2000
MOV RO,#2
SP-->
Ox2004
BL fun1
Ox2008
B ENDL
Ox200C
LBL1 push {LR}
Ox2010
MUL RO,RO
Ox2014
ADD RO, #1
Ox2018
BL LBL2
Ox201C
POP {PC}
Ox2020
| LBL2 push {LR}
Ox2024
MUL RO,RO
Ox2028
ADD RO, #1
Ox202C
BL LBL3
Ox2030
РОP (PC)
Ox2034
LBL3 push {LR}
Ox2038
ADD RO, #1
POP {PC}
OX3C4
Ox3C0
0X3BC
Ox203C
Ox2040
fun1
PUSH {LR}
Ox2044
BL LBL1
Ox2048
РOP (LR}
OX3B8
Ox204C
BX LR
OX3B4
Ox2050
ENDL
OX3B0
Transcribed Image Text:Memory Program (Instructions) Address Stack Me mory Ox 400 OX3FC 0X3F8 OX3F4 OX3F0 OX3EC OX3E8 0X3E4 OX3E0 OX3DC 0X3D8 OX3D4 OX3D0 OX3CC Ox3C8 Ox2000 MOV RO,#2 SP--> Ox2004 BL fun1 Ox2008 B ENDL Ox200C LBL1 push {LR} Ox2010 MUL RO,RO Ox2014 ADD RO, #1 Ox2018 BL LBL2 Ox201C POP {PC} Ox2020 | LBL2 push {LR} Ox2024 MUL RO,RO Ox2028 ADD RO, #1 Ox202C BL LBL3 Ox2030 РОP (PC) Ox2034 LBL3 push {LR} Ox2038 ADD RO, #1 POP {PC} OX3C4 Ox3C0 0X3BC Ox203C Ox2040 fun1 PUSH {LR} Ox2044 BL LBL1 Ox2048 РOP (LR} OX3B8 Ox204C BX LR OX3B4 Ox2050 ENDL OX3B0
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY