A-37
Appendices
CP2E CPU Unit Software User’s Manual(W614)
A-1 Instruction Functions
App
A-1-16 Subroutine Instructions
AVERAGE AVG --- Calculates the average value of an input word for the specified
number of cycles.
A-1-16 Subroutine Instructions
Instruction Mnemonic Variations Symbol/Operand Function
SUBROUTINE
CALL
SBS @ Calls the subroutine with the specified subroutine number and
executes that program.
SUBROUTINE
ENTRY
SBN --- Indicates the beginning of the subroutine program with the speci-
fied subroutine number.
SUBROUTINE
RETURN
RET --- Indicates the end of a subroutine program.
Instruction Mnemonic Variations Symbol/Operand Function
S
N
R
AVG(195)
S: Source word
N: Number of cycles
R: Result word
R + N + 1
R
R + 1
R + 2
R + 3
S: Source word
N: Number of cycles
Average
N values
Average Valid Flag
Pointer
SBS(091)
N
N: Subroutine number
Execution condition ON
Main program
Subroutine
program
(SBN(092) to
RET(093))
Program end
SBN(092)
N
N: Subroutine number
Subroutine region
or
RET(093)