A-75
Appendices
CJ2 CPU Unit Software User’s Manual
A-1 Instruction Functions
App
A-1-32 Text String Processing Instructions
GET STRING
RIGHT
RGHT$
@RGHT$
653 Output Required
GET STRING
MIDDLE
MID$
@MID$
654 Output Required
FIND IN
STRING
FIND
@FIND$
660 Output Required
STRING
LENGTH
LEN$
@LEN$
650 Output Required
REPLACE IN
STRING
RPLC$
@RPLC$
661 Output Required
Instruction Mnemonic Code Symbol/Operand Function Location
Execution
condition
RGHT$(653)
S1
S2
D
S1: Text string
1st word
S2: Number of
characters
D: 1st destination
word
00
Reads a designated number of characters from the right
(end) of a text string.
MID$(654)
S1
S2
S3
D
S1: Text string 1st
word
S2: Number of
characters
S3: Beginning
position
D: 1st destination
word
Reads a designated number of characters from any position
in the middle of a text string.
→→
FIND$(660)
S1
S2
D
S1: Source text
string 1st word
S2: Found text
string 1st word
D: 1st destination
word
Finds a designated text string from within a text string.
Found data
→→→
LEN$(650)
S
D
S: Text string first
word
D: 1st destination
word
1
3
5
2
4
Calculates the length of a text string.
→
RPLC$(654)
S1
S2
S3
S4
D
S1: Text string 1st
word
S2: Replacement
text string 1st word
S3: Number of
characters
S4: Beginning
position
D: 1st destination
word
Replaces a text string with a designated text string from a
designated position.
→→