389
CALL, CALLP
1
2
3
4
4
6
7
8
7.6
S
tructure cr
eation
instructions
7.6.3
C
ALL, CALLP
[Operation performed after subroutine program execution]
*1:
Stores the execution result of the subroutine program.
*2:
Replaced by the value of the function device.
(8) Up to 16 nesting levels are possible with the CALL(P) instruction. However, this 16 levels is the total number of levels in
the CALL(P), FCALL(P), ECALL(P), EFCALL(P), and XCALL instructions.
(9) Devices which are turned ON within subroutine programs will be latched even if the subroutine program is not executed.
Devices which are turned ON during the execution of a subroutine program can be turned OFF by the execution of the
FCALL(P) instruction.
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into
SD0.
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4101
The device specified for the argument cannot be secured for the data
size.
4210
There is no subroutine program for the pointer specified in the CALL (P)
instruction.
4211
After the CALL (P) instruction was executed, the END, FEND, GOEND,
or STOP instruction was executed prior to the RET instruction.
4212
The RET instruction was executed prior to the CALL (P) instruction.
4213
The 17th nesting level was executed.
D0
D3
D2
D1
0
I
ndef
i
n
i
te
I
ndef
i
n
i
te
I
ndef
i
n
i
te
I
ndef
i
n
i
te
1000
0
100
10
D0
D3
D2
D1
0
1000
100
10
0
1000
0
100
10
I
mmed
i
ate
ly
after
the
execut
i
on
of
CA
LL
i
nstruct
i
on
D0
D3
D2
D1
33
*
2
I
ndef
i
n
i
te
I
ndef
i
n
i
te
I
ndef
i
n
i
te
I
ndef
i
n
i
te
1000
*
2
100
100
*
2
1
*
2
D0
D3
D
4
D
4
D2
D1
0
1000
100
1
*
1
33
*
1
1000
100
*
1
100
10
After
the
execut
i
on
of
R
ET i
nstruct
i
on
F
D0
F
D0
F
D0
F
D0
D
4
D
4
T
ransfer
T
ransfer
Before
the
execut
i
on
of
subrout
i
ne
program
At
the
t
i
me
of
subrout
i
ne
program
execut
i
on
P0
CALL
FEND
RET
RET
RET
END
P0
P10
P20
CALL
P10
CALL
P20