Question
Let's say we have an MPS430 that operates at 16 MHz. Assume the mov instructions require 1 cycle to execute, the arithmetic and logic 2
Let's say we have an MPS430 that operates at 16 MHz. Assume the mov instructions require 1 cycle to execute, the arithmetic and logic 2 cycles, the jumps (jump or not) 3 cycles, the ret and instructions that work with the stack 4 cycles . Assume that 50% of the time a sum is made a carry is generated and the other 50% of the time it is not generated. Determine the average time, in nano seconds, that it takes to execute the following subroutine. Use three decimal places for your answer.
sub3: add R11, R12 jc up mov R11, & x mov R12, & and jmp end above: mov # 0, & x finish: ret
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