GSBS
Instruction
GLOBAL SUBROUTINE CALL
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
Not allowed
Operands
Operand
N
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.
Note Global subroutine numbers and regular subroutine numbers (SBS instructions and MCRO instruction operands) are
shared (do not use the same number for a global subroutine and a regular subroutine).
Operand Specifications
Word addresses
Area
CIO
WR
HR
N
---
---
---
Combined-use instructions
GSBS(750) is used in combination with GSBN(751) and GRET(752), the GLOBAL SUBROUTINE
ENTRY and GLOBAL SUBROUTINE RETURN instructions.
Flags
Name
Error Flag
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Mnemonic
Variations
GSBS
@GSBS
Block program areas
Step program areas
OK
OK
Description
Global subroutine number
AR
T
C
DM
EM
---
---
---
---
---
Label
ER
• ON if nesting exceeds 16 levels (counting both regular and global subroutines).
• ON if the specified global subroutine does not exist.
• ON if a global subroutine calls itself.
• ON if a global subroutine being executed is called.
• ON if the specified subroutine is not defined in interrupt task 0.
• OFF in all other cases.
Function
code
Calls the global subroutine with the specified
750
subroutine number and executes that program.
GSBS
GSBS(750)
N
N: Global subroutine number
Subroutines
OK
Indirect DM/EM
addresses
Con-
stants
@DM
*DM
DR
@EM
*EM
---
---
OK
---
Operation
3. Instructions
Function
SFC action or transition
Interrupt tasks
programs
OK
Not allowed
Data type
Size
SBN
---
1
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
---
---
---
---
3
TR
bits
---
691
Need help?
Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?
Questions and answers