36

CHAPTER 4 RESET AND "EIT" PROCESSING

Saved Registers

Except in the case of reset processing, the values of the "PS" and "PC" are saved to the stack as designated

by the "SSP", regardless of the value of the "S" flag in the "CCR". No save operation is used in reset

processing.

Figure 4.2-3 illustrates the saving of the values of the "PC" and "PS" in "EIT" processing.

Figure 4.2-3 Saving "PC" and "PS" Values in "EIT" Processing

Recovery from EIT handler

RETI instruction is used for recovery from the EIT handler.

To insure the program execution results after recovery, it is required that all the contents of the CPU

register are saved.

Ensure that the PC and PS values in the stack are not overwritten unless necessary because those values,

saved in the stack at the occurrence of EIT, are recovered from the stack during the recovery sequence

using the RETI instruction. Be sure to set the "S" flag to "0" when the RETI instruction is executed.

Memory space
Immediately before interrupt
80000000H
000FFC00H
SSP
TBR
12345678H
000C0010H
PC
PS
FFFFFFFFH
00000000H
7FFFFFF8H
7FFFFFFCH
offset: 000003B8H
Interrupt
IL=9
56781234H
Memory space
Immediately after interrupt
000FFC00H
SSP
TBR
56781234H
00090010H
PC
PS
FFFFFFFFH
00000000H
80000000H
7FFFFFFCH
7FFFFFF8H
offset: 000003B8H56781234H
12345678H
000C0010H