397
ECALL, ECALLP
1
2
3
4
4
6
7
8
7.6
S
tructure cr
eation
instructions
7.6.6
E
CALL, ECALLP
Incorrect operation example
The following example shows the operation performed when D0 is specified for FD0 in the subroutine program and D1 is
used in the subroutine program.
[Program example]
[Operation performed after subroutine program execution]
*1:
Stores the execution result of the subroutine program.
*2:
Replaced by the value of the function device.
*3:
D1 does not reflect the value of the function device.
Correct operation example
The following example shows the operation performed when D0 is specified for FD0 in the subroutine program and D4 is
used in the subroutine program.
[Program example]
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
100
10
D0
D3
D2
D1
0
1000
100
10
0
1000
100
10
I
mmed
i
ate
ly
after
the
execut
i
on
of
E
CA
LL
i
nstruct
i
on
T
ransfer
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
*
2
110
*
3
D0
D3
D2
D1
0
1000
100
1
*
1
33
*
1
1000
100
110
*
1
After
the
execut
i
on
of
R
ET i
nstruct
i
on
F
D0
F
D0
F
D0
F
D0
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
[MAIN]
[ABC]