2.2.62 TRAPA
TRAPA (TRAP Always)
Trap Unconditionally
Operation
PC
→
@–SP
CCR
→
@–SP
<Vector>
→
PC
Assembly-Language Format
TRAPA #x:2
Operand Size
—
Condition Code
I:
Always set to 1.
U: See notes.
H: Previous value remains unchanged.
N: Previous value remains unchanged.
Z:
Previous value remains unchanged.
V: Previous value remains unchanged.
C: Previous value remains unchanged.
I
UI
H
U
N
Z
V
C
1
∆
*1
—
—
—
—
—
—
Description
This instruction pushes the program counter (PC) and condition-code register (CCR) on the stack,
then sets the I bit to 1 and branches to a new address. The new address is the contents of the vector
address corresponding to the specified vector number. The PC value pushed on the stack is the
starting address of the next instruction after the TRAPA instruction.
Operand Format and Number of States Required for Execution
Notes
1. CCR bit 6 is set to 1 when used as an interrupt mask bit, but retains its previous value when
used as a user bit.
2. The stack and vector structure differ between normal mode and advanced mode.
Vector Address
Normal Mode
Advanced Mode
0
H'0010 to H'0011
H'000020 to H'000023
1
H'0012 to H'0013
H'000024 to H'000027
2
H'0014 to H'0015
H'000028 to H'00002B
3
H'0016 to H'0017
H'00002C to H'00002F
#x
Instruction Format
1st byte
2nd byte
3rd byte
4th byte
Register direct
TRAPA
#x:2
5
7
00 IMM
0
14
No. of
States
Addressing
Mode
Mnemonic
Operands
182