Appendices
A-46
CJ2 CPU Unit Software User’s Manual
SET
RECORD
LOCATION
SETR
@SETR
635 Output Required
GET
RECORD
NUMBER
GETR
@GETR
636 Output Required
DATA
SEARCH
SRCH
@SRCH
181 Output Required
SWAP
BYTES
SWAP
BYTES
637 Output Required
FIND MAXI-
MUM
MAX
@MAX
182 Output Required
DOUBLE
FIND MAXI-
MUM
MAXL
@MAXL
174 Treats the number of data items specified by C as double-word
table data beginning from the first word in the range specified by
R1, and outputs the maximum value in the table to D+1 and D.
Output Required
Instruction Mnemonic Code Symbol/Operand Function Location
Execution
condition
SETR(635)
N
R
D
N: Table number
R: Record number
D: Destination
Index Register
R
Record
number (R)
Table number (N)
Internal I/O
memory address
SETR(635) writes the internal I/O
memory address (m) of the first word
of record R to Index Register D.
Writes the location of the specified record (the internal I/O
memory address of the beginning of the record) in the
specified Index Register.
GETR(636)
N
IR
D
N: Table number
IR: Index Register
D: Destination
word
IR
n
Returns the record number of the record at the internal I/O
memory address contained in the specified Index Register.
Table number (N)
Internal I/O
memory address
GETR(636) writes
the record number
of the record that
includes I/O
memory address
(m) to D.
Record number
(R)
SRCH(181)
C
R1
Cd
C: 1st control word
R1: 1st word in
range
Cd: Comparison
data
R1
R1+(C−1)
Cd
C
Search
Match
Internal I/O
memory address
Searches for a word of data within a range of words.
N
R1
SWAP(637)
N: Number of
words
R1: 1st word in
range
N
R1
Switches the leftmost and rightmost bytes in all of the words
in the range.
Byte position is swapped.
MAX(182)
C
R1
D
C: 1st control word
R1: 1st word in
range
D: Destination
word
R1
R1+(W−1)
Finds the maximum value in the range.
Internal I/O
memory address
C words
Max.
value
MAXL(174)
C
R1
D
C: 1st control word
R1: 1st word in
range
D: 1st destination
word