Need help with assembly problem
€8-30 EUR
Paid on delivery
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, D0
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,D0
13: 0000102C CMP.B #5, D0
14: 00001030 BLT LOOP1
15: 00001032 LEA $6000, A1
16: 00001036 MOVE.B #0, D0
17: 0000103A LOOP2 MOVE.W (SP)+, (A1)+
18: 0000103C ADDQ.B #1,D0
19: 0000103E CMP.B #5, D0
20: 00001042 BLT LOOP2
Answer the following questions, provide all values in hexadecimal.
What is the value of the PC while executing instructions #12 and #18?
What is the calculated displacement at instruction #14? Explain your answer.
What is the machine code (in hexadecimal) of instructions #09 and #16?
What is the value of the SP right after executing instruction #15?
What is the value of the SP at the end of the program?
What is the long value stored at address $6002 and the value of D0 after the execution of the program?
What’s the value at the X and C flags in the CCR register after executing #10 in the first iteration of the loop?
Project ID: #30900738
About the project
2 freelancers are bidding on average €15 for this job
ASSEMBLY EXPERT 8YRS EXPERIENCE HELLO, I have GONE through your REQUIREMENTS, and I believe I have the personnel and SKILL needed to FINISH this project. I have done NUMEROUS of these projects before. I hereby humbly r More