 Question:
Number of cycles to do a full contact switch save?
Answer:
Depends on what is meant by "Full". Saving
every single register is not normally done if it can be
avoided by smart code writing. Minimal context switching
of the accumulator and the 2 status registers takes
approximately 5 cycles for
save, 8
cycles for restore. Each auxiliary
register adds 1 cycle save, 2 cycles restore. P and T
registers combined add 5 cycles save, 5 cycles restore.
There may also be a few overhead cycles to initialize a
stack pointer or set the data page. Also, these numbers
assume that the contexting is done in on-chip memory (external mem can have bus
bottlenecks and/or wait-states).
|