Appendices
A-48
CJ2 CPU Unit Software User’s Manual
SUM SUM
@SUM
184 Output Required
STACK SIZE
READ
SNUM
@SNUM
638 Counts the amount of stack data (number of words) in the speci-
fied stack.
Output Required
STACK DATA
READ
SREAD
@SREAD
639 Reads the data from the specified data element in the stack. The
offset value indicates the location of the desired data element
(how many data elements before the current pointer position).
Output Required
STACK DATA
OVERWRITE
SWRIT
@SWRIT
640 Writes the source data to the specified data element in the stack
(overwriting the existing data). The offset value indicates the loca-
tion of the desired data element (how many data elements before
the current pointer position).
Output Required
STACK DATA
INSERT
SINS
@SINS
641 Inserts the source data at the specified location in the stack and
shifts the rest of the data in the stack downward. The offset value
indicates the location of the insertion point (how many data ele-
ments before the current pointer position).
Output Required
STACK DATA
DELETE
SDEL
@SDEL
642 Deletes the data element at the specified location in the stack and
shifts the rest of the data in the stack upward. The offset value
indicates the location of the deletion point (how many data ele-
ments before the current pointer position).
Output Required
Instruction Mnemonic Code Symbol/Operand Function Location
Execution
condition
SUM(184)
C
R1
D
C: 1st control word
R1: 1st word in
range
D: 1st destination
word
R1
)
R1+(W−1)
Adds the bytes or words in the range and outputs the
result to two words.
SNUM(638)
TB
D
TB: First stack
address
D: Destination word
SREAD(639)
TB
C
D
TB: First stack
address
C: Offset value
D: Destination word
SWRIT(640)
TB
C
S
TB: First stack
address
C: Offset value
S: Source data
SINS(641)
TB
C
S
TB: First stack
address
C: Offset value
S: Source data
SDEL(642)
TB
C
D
TB: First stack
address
C: Offset value
D: Destination word