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