1
-
10
CHAPTER1 OVERVIEW
1
1.4 D
evice
s and
Instr
uctions Useful for Pr
ogramming
(b) Subroutine call instruction with argument passing
Subroutine program that is called more than one time can be created easily
*1:
For input and output conditions for an argument, refer to Section 9.3.1.
Figure 1.17 Calling subroutine program with argument passing
FD2
FD1
MOV
SM400
FD2
FD0
MOV
RET
FEND
END
M0
M0
M10
R10
K4X10
W10
P0
CALLP
P0
100
0
Always
on
Argument from FD2
*1
Source data
Destination data
M0
R0
K4X0
W0
P0
CALLP
Argument from FD2
*1
Argument to FD1
Argument to FD0
Argument to FD1
Argument to FD0
Argument specification
Argument specification
Subroutine program
specification
Main routine program
Subroutine program