Question: The subroutine DelayMS is to implement a 1 millisecond (ms) delay. The assembly listing of the subroutine DelayMS is shown below. 00000bea : bea:

The subroutine DelayMS is to implement a 1 millisecond (ms) delay. The 

The subroutine DelayMS is to implement a 1 millisecond (ms) delay. The assembly listing of the subroutine DelayMS is shown below. 00000bea : bea: 00 00 eb clr.w WO bec: -1-2- mov.W #Number, w1 00000bee : bee: 00 00 e8 bf0: 81 Of 50 inc.w WO, WO bf2: fd ff 3a bf4: 00 00 eb bf6: 00 00 06 sub.w bra clr.w return wo, w1, [w15] NZ, Oxbee WO Here Number is a 16-bit hex value to be determined. Assume an instruction frequency of 16 MHz for an instruction cycle time, TCY, of 62.5 ns. (a) How many bytes of program memory does the subroutine DelayMS occupy? (b) What does [w15] correspond to and how is it used? (c) What value should Number be for this routine to take as close to, but no greater than, 1 ms as possible? Include the time it takes the rcall instruction in the calling routine. Activate V (d) To take exactly 1 ms how many, if any, nop instructions need to be inserted and where.Go to Setting

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 Programming Questions!