
Technical Data
MC68HC11E Family
—
Rev. 4
50
Central Processor Unit (CPU)
MOTOROLA
Central Processor Unit (CPU)
When an interrupt is recognized, the current instruction finishes
normally, the return address (the current value in the program counter)
is pushed onto the stack, all of the CPU registers are pushed onto the
stack, and execution continues at the address specified by the vector for
the interrupt.
At the end of the interrupt service routine, an return-from interrupt (RTI)
instruction is executed. The RTI instruction causes the saved registers
to be pulled off the stack in reverse order. Program execution resumes
at the return address.
Certain instructions push and pull the A and B accumulators and the X
and Y index registers and are often used to preserve program context.
For example, pushing accumulator A onto the stack when entering a
subroutine that uses accumulator A and then pulling accumulator A off
the stack just before leaving the subroutine ensures that the contents of
a register will be the same after returning from the subroutine as it was
before starting the subroutine.
3.3.5 Program Counter (PC)
The program counter, a 16-bit register, contains the address of the next
instruction to be executed. After reset, the program counter is initialized
from one of six possible vectors, depending on operating mode and the
cause of reset. See
Table 3-1
.
Table 3-1. Reset Vector Comparison
Mode
POR or RESET Pin
Clock Monitor
COP Watchdog
Normal
$FFFE, F
$FFFC, D
$FFFA, B
Test or Boot
$BFFE, F
$BFFC, D
$BFFA, B