1. What is the value of the PC while executing instructions #12 and #18? 2. What is the calculated displacement at instruction #14? Explain your answer. 3. What is the machine code (in hexadecimal) of instructions #09 and #16? 4. What is the value of the SP right after executing instruction #15? 5. What is the value of the SP at the end of the program? 6. What is the long value stored at address $6002 and the value of DO after the execution of the program? 7. What's the value at the X and C flags in the CCR register after executing #10 in the first iteration of the loop?
1. What is the value of the PC while executing instructions #12 and #18? 2. What is the calculated displacement at instruction #14? Explain your answer. 3. What is the machine code (in hexadecimal) of instructions #09 and #16? 4. What is the value of the SP right after executing instruction #15? 5. What is the value of the SP at the end of the program? 6. What is the long value stored at address $6002 and the value of DO after the execution of the program? 7. What's the value at the X and C flags in the CCR register after executing #10 in the first iteration of the loop?
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...
Related questions
Question
![Given the following assembly code snippet, assume <SP> = $9000.
Line #: memory address
Assembly code
00: 00001000
LEA $6000, A1
01: 00001004
MOVE.W #%1000000000000001, (A1)+
02: 00001008
MOVE.W #%1100000000000011, (A1)+
03: 0000100C
MOVE.W #%1110000000000111, (A1)+
04: 00001010
MOVE.W #%1111000000001111, (A1)+
05: 00001014
MOVE.W #%1111100000011111, (A1)
06: 00001018
LEA $6000, A1
07: 0000101C
MOVE.B #0, DO
08: 00001020
LOOP1
MOVE.W (A1)+, D1
09: 00001022
AND.W #$00FF, D1
10: 00001026
LSR #1, D1
11: 00001028
MOVE.W D1, -(SP)
12: 0000102A
ADDQ.B #1,DO
13: 0000102c
CMP.B #5, DO
14: 00001030
BLT LOOP1
15: 00001032
LEA $6000, A1
16: 00001036
MOVE.B #0, DO
17: 0000103A
LOOP2
MOVE.W (SP)+, (A1)+
18: 0000103C
ADDQ.B #1,DO
19: 0000103E
CMP.B #5, DO
20: 00001042
BLT LOOP2
Answer the following questions, provide all values in hexadecimal.
1. What is the value of the PC while executing instructions #12 and #18?
2. What is the calculated displacement at instruction #14? Explain your answer.
3. What is the machine code (in hexadecimal) of instructions #09 and #16?
4. What is the value of the SP right after executing instruction #15?
5. What is the value of the SP at the end of the program?
6. What is the long value stored at address $6002 and the value of DO after the execution of the
program?
7. What's the value at the X and C flags in the CCR register after executing #10 in the first iteration
of the loop?](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F81b70df4-f997-4558-8ad5-989e415e252d%2F4ef1d9eb-c7b9-4f11-94d6-5e81658b5256%2Fbz11_processed.png&w=3840&q=75)
Transcribed Image Text:Given the following assembly code snippet, assume <SP> = $9000.
Line #: memory address
Assembly code
00: 00001000
LEA $6000, A1
01: 00001004
MOVE.W #%1000000000000001, (A1)+
02: 00001008
MOVE.W #%1100000000000011, (A1)+
03: 0000100C
MOVE.W #%1110000000000111, (A1)+
04: 00001010
MOVE.W #%1111000000001111, (A1)+
05: 00001014
MOVE.W #%1111100000011111, (A1)
06: 00001018
LEA $6000, A1
07: 0000101C
MOVE.B #0, DO
08: 00001020
LOOP1
MOVE.W (A1)+, D1
09: 00001022
AND.W #$00FF, D1
10: 00001026
LSR #1, D1
11: 00001028
MOVE.W D1, -(SP)
12: 0000102A
ADDQ.B #1,DO
13: 0000102c
CMP.B #5, DO
14: 00001030
BLT LOOP1
15: 00001032
LEA $6000, A1
16: 00001036
MOVE.B #0, DO
17: 0000103A
LOOP2
MOVE.W (SP)+, (A1)+
18: 0000103C
ADDQ.B #1,DO
19: 0000103E
CMP.B #5, DO
20: 00001042
BLT LOOP2
Answer the following questions, provide all values in hexadecimal.
1. What is the value of the PC while executing instructions #12 and #18?
2. What is the calculated displacement at instruction #14? Explain your answer.
3. What is the machine code (in hexadecimal) of instructions #09 and #16?
4. What is the value of the SP right after executing instruction #15?
5. What is the value of the SP at the end of the program?
6. What is the long value stored at address $6002 and the value of DO after the execution of the
program?
7. What's the value at the X and C flags in the CCR register after executing #10 in the first iteration
of the loop?
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
Step 1
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY