7 APPLICATION INSTRUCTIONS
7.6 Structure Creation Instructions
467
7
Return from subroutine programs
RET
• Indicates end of subroutine program
• When the RET instruction is executed, returns to the step following the CALL (P), FCALL (P), ECALL (P), EFCALL (P) or
XCALL instruction which called the subroutine program.
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Setting
data
Internal device R, ZR J\ U\G Zn Constant Others
Bit Word Bit Word
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4211 After the CALL(P), FCALL (P), ECALL (P), EFCALL (P) or XCALL instruction
was executed, an END, FEND, GOEND, or STOP instruction was executed
prior to the RET instruction.
4212 The RET instruction was executed prior to the CALL (P), FCALL (P), ECALL
(P), EFCALL (P) or XCALL instruction.
Basic
Process
High
performance
Redundant
Universal
LCPU
Main routine
program
CALL Pn
END
Subroutine
program
RET
Pn