Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. (25 points) Analyze assembly program Consider the following code segment. 02 04 06 01 CLR R12 MOV.W mylw, R6 03 MOV.W #1, R5 MOV.B
2. (25 points) Analyze assembly program Consider the following code segment. 02 04 06 01 CLR R12 MOV.W mylw, R6 03 MOV.W #1, R5 MOV.B #16, R7 05 lnxt: BIT.W R5, R6 JNZ lskip INCR12 08 lskip:RRA.W R6 09 DEC.B R7 10 JNZ lnxt 11 MOV.B R12, P2OUT 12 13 mylw: .long 0x8C9E2A7D 9 VOLLZAD 07 2.A. (2 points) How many bytes are allocated by the assembly directive in line 13? What are the values of the most significant bit and the least significant bit? 2.B. (3 points) What is the content of register R6 after the instruction in line 02 is completed? 3.C. (15 points) What does this code segment do? Explain your answer. 3.D. (5 points) Calculate the total execution time in seconds for the code sequence from above (line 01 - line 11). We know the following: the average CPI is 2 clocks per instruction. Assume the clock frequency is 1 MHz. What is MIPS rate for this code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started