A-1-18 Subroutine Instructions - Omron CJ2 CPU - REV 10-2010 User Manual

Cj2 cpu unit software
Table of Contents

Advertisement

Appendices
A-1-18
Subroutine Instructions
Instruction
Mnemonic
Code
SUBROU-
SBS
091
TINE CALL
@SBS
MACRO
MCRO
099
@MCRO
SUBROU-
SBN
092
TINE ENTRY
SUBROU-
RET
093
TINE
RETURN
GLOBAL
GSBS
750
SUBROU-
@GSBS
TINE CALL
GLOBAL
GSBN
751
SUBROU-
TINE ENTRY
GLOBAL
GRET
752
SUBROU-
TINE
RETURN
A-54
Symbol/Operand
Calls the subroutine with the specified subroutine
SBS(091)
number and executes that program.
N
N: Subroutine
number
Calls the subroutine with the specified subroutine number and
MCRO(099)
executes that program using the input parameters in S to S+3
N
and the output parameters in D to D+3.
S
D
N: Subroutine
number
S: 1st input
parameter word
D: 1st output
parameter word
Indicates the beginning of the subroutine program with
SBN(092)
the specified subroutine number.
N
N: Subroutine
number
Indicates the end of a subroutine program.
RET(093)
Calls the subroutine with the specified subroutine number and
GSBS(750)
executes that program.
N
N: Subroutine
number
Indicates the beginning of the subroutine program with the speci-
GSBN(751)
fied subroutine number.
N
N: Subroutine
number
Indicates the end of a subroutine program.
GRET(752)
Function
Execution condition ON
Main program
Subroutine
program
(SBN(092) to
RET(093))
Program end
MCRO(099)
Execution of
sub-routine between
SBN(092) and
RET(093).
MCRO(099)
The subroutine uses A600 to
A603 as inputs and A604 to
A607 as outputs.
or
Subroutine region
CJ2 CPU Unit Software User's Manual
Execution
Location
condition
Output
Required
Output
Required
Output
Required
Output
Not
required
Output
Required
Output
Not
required
Output
Not
required

Advertisement

Table of Contents
loading

Table of Contents