2-2-18 Subroutine Instructions - Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual

Table of Contents

Advertisement

2-2-18 Subroutine Instructions

Instruction
Symbol/Operand
Mnemonic
Code
SUBROUTINE
SBS(091)
CALL
SBS
@SBS
091
N: Subroutine
number
MACRO
MCRO(099)
MCRO
@MCRO
N
099
S
D
N: Subroutine
number
S: 1st input
parameter word
D: 1st output
parameter word
SUBROUTINE
SBN(092)
ENTRY
SBN
092
N: Subroutine
number
SUBROUTINE
RET(093)
RETURN
RET
093
GLOBAL SUB-
ROUTINE CALL
GSBS(750)
(CJ2, CS1-H,
CJ1-H, CJ1M, or
CS1D only)
N: Subroutine
GSBS
number
750
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Calls the subroutine with the specified subroutine number and
executes that program.
N
Calls the subroutine with the specified subroutine number and
executes that program using the input parameters in S to S+3 and the
output parameters in D to D+3.
MCRO(099)
MCRO(099)
Indicates the beginning of the subroutine program with the specified
subroutine number.
N
Indicates the end of a subroutine program.
Calls the subroutine with the specified subroutine number and exe-
cutes that program.
N
Function
Execution condition ON
Main program
Subroutine
program
(SBN(092) to
RET(093))
Program end
Execution of sub-
routine between
SBN(092) and
RET(093).
The subroutine uses A600 to
A603 as inputs and A604 to
A607 as outputs.
or
Subroutine region
2. Summary of Instructions
Location
Execution
condition
Output
Required
Output
Required
Output
Not required
Output
Not required
Output
Not required
Page
685
2
691
694
694
697
93

Advertisement

Table of Contents
loading

Table of Contents