705
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Subroutines
3
GSBN/GRET
GSBN/GRET
Applicable Program Areas
Operands
N: Subroutine number
Specifies the subroutine number between 0 and 1023 decimal.
Note For CJ1M-CPU11 and CJ1M-CPU21 CPU Units, the subroutine number must be between the range 0 to 255
decimal.
z Operand Specifications
Combined-use instructions
z GSBN/GRET
GSBN(751) and GRET(752) are used in combination with GSBS(750), the GLOBAL SUBROUTINE
CALL.
Flag
z GSBN/GRET
There are no flags affected by this instruction.
Instruction Mnemonic Variations
Function
code
Function
GLOBAL SUBROUTINE
ENTRY
GSBN --- 751
Indicates the beginning of the global subroutine program
with the specified subroutine number.
GLOBAL SUBROUTINE
RETURN
GRET --- 752 Indicates the end of a subroutine program.
Symbol
GSBN GRET
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or transition
programs
Usage Not allowed Not allowed Not allowed Not allowed OK Not allowed
Operand Description
Data type
Size
GSBN
N Global subroutine number --- 1
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
N --- --- --- --- --- --- --- --- --- --- OK --- --- --- --- --- --- ---
GSBN(751)
N
N: Global subroutine number
GRET(752)