1105
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Text String Processing Instructions
3
INS$
INS$
Applicable Program Areas
Operands
S1: Base Text String D: First Destination Word
S2: Inserted Text String
S3: Beginning Position
(0000 to 0FFF hex or &0 to &4095)
Note • The data from S1 to S1 + the maximum 2,047 words, from S2 to S2 + the maximum 2,047 words, and from D to D +
the maximum 2,047 words must be in the same area.
• The data from S2 to S2 + the maximum 2,047 words and from D to D + the maximum 2,047 words cannot overlap.
The data from S1 to S1 + the maximum 2,047 words and from D to D + the maximum 2,047 words can overlap. The
data from S1 to S1 + the maximum 2,047 words and from S2 to S2 + the maximum 2,047 words can also overlap.
Instruction Mnemonic Variations
Function
code
Function
INSERT INTO STRING INS$ @INS$ 657
Inserts a designated text string into the middle of a
text string.
Symbol
INS$
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or transition
programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
S1 Base text string first word UINT Variable
S2 Inserted text string first word UINT Variable
S3 Beginning position UINT 1
D First destination word UINT Variable
S1: Base text string first word
S2: Inserted text string first word
S3: Beginning position
D: First destination word
INS$(657)
S1
S2
S3
D
15 0
S1
to to
Text string data: 4,095 characters max. + NUL
S1 + maximum 2,047 words
15 0
D
to to
Text string data: 4,095 characters max. + NUL
D + maximum 2,047 words
15 0
S2
to to
Text string data: 4,095 characters max. + NUL
S2 + maximum 2,047 words