![NXP Semiconductors MC9S08PA4 Reference Manual Download Page 212](http://html1.mh-extra.com/html/nxp-semiconductors/mc9s08pa4/mc9s08pa4_reference-manual_1721838212.webp)
1. Store the contents of PCL, PCH, X, A, and CCR on the stack, in that order.
2. Set the I bit in the CCR.
3. Fetch the high-order half of the interrupt vector.
4. Fetch the low-order half of the interrupt vector.
5. Delay for one free bus cycle.
Fetch three bytes of program information starting at the address indicated by the interrupt
vector to fill the instruction queue in preparation for execution of the first instruction in
the interrupt service routine.
After the CCR contents are pushed onto the stack, the I bit in the CCR is set to prevent
other interrupts while in the interrupt service routine. Although it is possible to clear the I
bit with an instruction in the interrupt service routine, this would allow nesting of
interrupts (which is not recommended because it leads to programs that are difficult to
debug and maintain).
For compatibility with the earlier M68HC05 MCUs, the high-order half of the H:X index
register pair (H) is not saved on the stack as part of the interrupt sequence. The user must
use a PSHH instruction at the beginning of the service routine to save H and then use a
PULH instruction just before the RTI that ends the interrupt service routine. It is not
necessary to save H if you are certain that the interrupt service routine does not use any
instructions or auto-increment addressing modes that might change the value of H.
The software interrupt (SWI) instruction is like a hardware interrupt except that it is not
masked by the global I bit in the CCR and it is associated with an instruction opcode
within the program so it is not asynchronous to program execution.
10.7 Instruction Set Summary
Table 10-3. Instruction Set Summary
Source Form
Operation
Description
Effect on CCR
Address
Mode
Opcode
Operand
Bus Cycles
V H I N Z C
ADC #opr8i
↕
↕
–
↕
↕
↕
IMM
A9
ii
2
ADC opr8a
↕
↕
–
↕
↕
↕
DIR
B9
dd
3
ADC opr16a
↕
↕
–
↕
↕
↕
EXT
C9
hh ll
4
ADC oprx16,X
↕
↕
–
↕
↕
↕
IX2
D9
ee ff
4
ADC oprx8,X
Add with Carry
A
←
(A) + (M) + (C)
↕
↕
–
↕
↕
↕
IX1
E9
ff
3
ADC ,X
↕
↕
–
↕
↕
↕
IX
F9
3
ADC oprx16,SP
↕
↕
–
↕
↕
↕
SP2
9ED9
ee ff
5
ADC oprx8,SP
↕
↕
–
↕
↕
↕
SP1
9EE9
ff
4
Table continues on the next page...
Instruction Set Summary
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
212
NXP Semiconductors
Summary of Contents for MC9S08PA4
Page 1: ...MC9S08PA4 Reference Manual Supports MC9S08PA4 Document Number MC9S08PA4RM Rev 5 08 2017 ...
Page 2: ...MC9S08PA4 Reference Manual Rev 5 08 2017 2 NXP Semiconductors ...
Page 22: ...MC9S08PA4 Reference Manual Rev 5 08 2017 22 NXP Semiconductors ...
Page 28: ...System clock distribution MC9S08PA4 Reference Manual Rev 5 08 2017 28 NXP Semiconductors ...
Page 150: ...Port data registers MC9S08PA4 Reference Manual Rev 5 08 2017 150 NXP Semiconductors ...
Page 196: ...Human machine interfaces HMI MC9S08PA4 Reference Manual Rev 5 08 2017 196 NXP Semiconductors ...
Page 224: ...Instruction Set Summary MC9S08PA4 Reference Manual Rev 5 08 2017 224 NXP Semiconductors ...
Page 232: ...Functional Description MC9S08PA4 Reference Manual Rev 5 08 2017 232 NXP Semiconductors ...
Page 258: ...FTM Interrupts MC9S08PA4 Reference Manual Rev 5 08 2017 258 NXP Semiconductors ...
Page 294: ...Functional description MC9S08PA4 Reference Manual Rev 5 08 2017 294 NXP Semiconductors ...
Page 398: ...Resets MC9S08PA4 Reference Manual Rev 5 08 2017 398 NXP Semiconductors ...
Page 400: ...MC9S08PA4 Reference Manual Rev 5 08 2017 400 NXP Semiconductors ...