CHAPTER 7 INTERRUPT/EXCEPTION PROCESSING FUNCTION
167
User’s Manual U15195EJ5V0UD
Figure 7-10. Exception Trap Processing
Exception trap (ILGOP) occurs
DBPC
DBPSW
PSW.NP
PSW.EP
PSW.ID
PC
Restored PC
PSW
1
1
1
00000060H
Exception processing
CPU processing
(2) Restore
Returning from exception trap processing is carried out by the DBRET instruction. By executing the DBRET
instruction, the CPU carries out the following processing and controls the address of the restored PC.
(1) Loads the restored PC and PSW from DBPC and DBPSW.
(2) Transfers control to the address indicated by the restored PC and PSW.
Figure 7-11 illustrates the processing for restoring from an exception trap.
Figure 7-11. Processing for Restoring from Exception Trap
DBRET instruction
PC
PSW
DBPC
DBPSW
Jump to address of restored PC