CHAPTER 17 INTERRUPT/EXCEPTION PROCESSING FUNCTION
User’s Manual U16896EJ2V0UD
562
17.6 Exception Trap
The exception trap is an interrupt that is requested when the illegal execution of an instruction takes place. In the
V850ES/KE1+, an illegal opcode trap (ILGOP) is considered as an exception trap.
17.6.1 Illegal opcode
An illegal opcode is defined as an instruction with instruction opcode (bits 10 to 5) = 111111B, sub-opcode (bits 26
to 23) = 0111B to 1111B, and sub-opcode (bit 16) = 0B. When such an instruction is executed, an exception trap is
generated.
15
16
23 22
X X X X X X 0
X
X
X
X
X
X
X
X
X
X
1
1
1
1
1
1
X
X
X
X
X
27 26
31
0
4
5
10
11
1
1
1
1
1
1
0
1
X: don’t care
Caution It is recommended not to use illegal opcode because instructions may newly be assigned in the
future.
(1) Operation
Upon generation of an exception trap, the CPU performs the following processing and transfers control to a
handler routine.
<1> Saves the restored PC to DBPC.
<2> Saves the current PSW to DBPSW.
<3> Sets the PSW.NP, PSW.EP, and PSW.ID bits.
<4> Loads the handler address (00000060H) for the exception trap routine to the PC and transfers control.
Figure 17-10 shows the exception trap processing flow.