Question: 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.

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!