Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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