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