Fujitsu FR81 Computer Hardware User Manual


 
CM71-00105-1E FUJITSU MICROELECTRONICS LIMITED 45
FR81 Family
CHAPTER 4 RESET AND "EIT" PROCESSING
4.2
Figure 4.2-2
Example of storing of PC, PS during an EIT event occurrence
4.2.3 Recovery from EIT Processing
RETI instruction is used for recovery from an EIT processing program. The RETI instruction retrieves the
value of program counter (PC) and program status (PS) from the system stack, EIT and recovers from the
EIT processing.
1. Retrieving program counter (PC) from the system stack
(SSP) PC SSP+4 SSP
2. Retrieving program status (PS) from the system stack
(SSP) PS SSP+4 SSP
To ensure the program execution results after recovery from the EIT processing program, it is required that
all contents of the CPU registers before the commencement of EIT processing program have been saved at
the time of recovery. The registers used in the EIT processing programs should be saved in the system stack
and retrieved just before the RETI instruction.
[Example]
[Before interrupt] [After interrupt]
SSP
80000000
H
SSP
7FFFFFF8
H
Memory
80000000
H
80000000
H
7FFFFFFC
H
7FFFFFFC
H PS
7FFFFFF8
H 7FFFFFF8
H PC
Memory