Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I just need B and C, ASAP. Thanks! 3. (25 points) Analyze assembly program Consider the following code segment. Initialize stack pointer 1 RESET: 2

I just need B and C, ASAP. Thanks! image text in transcribed
3. (25 points) Analyze assembly program Consider the following code segment. Initialize stack pointer 1 RESET: 2 StopWDT mov.w WDTPW WDTHOLD, &WDTCTL Stop watchdog timer 4 6 gnext: mov.w #-STACK-END,SP sub.w #10, SP mov.W SP, R6 mov.w #myinput, R4 mov.b R4RS . b #e,R5 jz . b #'A', RS j1 lend 18 lcopy 12 13 14 1conv: 15 16 lcopy: 17 18 19 lend: 20 21 myinput .cstring "CPE325Lab" j1 jmp sub . b add " b mov.b inc.w jmp mov.b jmp lconv lcopy #'A', R5 #'a', R5 R5,6(R6) R6 gnext R5, e (R6) jump to current location '$ (endless loop) A. (12 points) What does this program do? Add code comments (lines 1-19). B. (10 points) Sketch the content of the stack at the moment when the program executes the instruction at line 20. Assume that the original value of R1-0x0600 (initialized in line 1). asci('A)-0x41, ascii(Z')-0xSA, ascii('0)-0x30. dress M15.8] 0x0600 C. (3 points) Calculate the total execution time in seconds (time it takes for the program to reach statement in line 20). Assume the clock frequency is 8 MHz. How many instructions are executed in this program (before reaching the statement at line 20)

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_2

Step: 3

blur-text-image_3

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

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions

Question

LO6 Describe how individual pay rates are set.

Answered: 1 week ago