7 Applied Instructions (Program Flow)
7.4 IRET / Interrupt Return
118
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Cautions
1) Create a task for the interrupt program and the main program.
2) Use "Event" to specify the interrupt pointer to be used for the task for the interrupt program.
→ For the interrupt pointer, refer to Chapter 35.
3) IRET instruction needs not to be programmed because the IRET instruction is automatically added during
the compilation at the end of the program block that is registered in the task for the interrupt program.
4) The program block registered in the task for the main program requires the function EI instruction
(interrupt enabled). Program the function DI instruction (interrupt disabled) as necessary.
Set an interrupt pointer
INC
EN ENO
Interrupt program
IRET
EN ENO
D0
Do not program IRET instruction because
it is automatically added during the compilation.
d
DI
EN ENO
FEND
EN ENO
If necessary, program the DI instruction as
it is a interrupt disabled function.
Do not program the FEND instruction as
it is automatically added during the compilation.
Range of interrupt enabled
EI
EN ENO