Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

s (as points) Analyze assembly program Consider the following code segment. data .cstring 32SLab. mystr : .text mov.w mov.wtr, R4 i Assemble into progran memory.

image text in transcribed
s (as points) Analyze assembly program Consider the following code segment. data .cstring "32SLab. mystr : .text mov.w mov.wtr, R4 i Assemble into progran memory. #STACK END,SP ; Initialize stackpointer StopMOT: movDTPW WDTHOLD, &WDTCTL i Stop watchdog timer gnext: mov.b @R4, R5 lend lnext j1 jmp sub-b add.b lconv lcopy #"a", #'A.,RS Iconv: RS lcopy: mov.b RS, e(R4) lnext: inc.w R4 jmp gnext lend: jmp jump to current location ' (endless loop) A. (20 points) What does this program do? Add code comments B. (5 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 infinite loop)

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

3rd Edition

0760049041, 978-0760049044

More Books

Students also viewed these Databases questions

Question

design a simple disciplinary and grievance procedure.

Answered: 1 week ago