7 APPLICATION INSTRUCTION
7.6 Character string operation instruction
401
7
• These instructions insert the character string specified by (s1) at the (s2)th character from the start of the character string
specified by (d).
• When the number of characters after insertion, (s1)+(d), is even, a NULL code (00H) is stored in the device (1 word) after
the last device storing the character string.
• When the number of characters after insertion, (s1)+(d), is odd, a NULL code (00H) is stored in the last device (upper 8
bits) of the character string.
• If the number of characters exceeding (d) by one character is specified in (s2), the character string in (s1) is added to the
end of the character string in (d).
Error code
(SD0/SD8067)
Description
2820 No NULL code (00H) exists in the corresponding device range of the device specified by (s1) and later.
No NULL code (00H) exists in the corresponding device range of the device specified by (d) and later.
2821 A device of the character strings (s1) and (d) overlaps.
The device storing the character string after insertion, (s1)+(d), overlaps with the character string-storing device of (s1).
3405 The character string specified by (s1) has more than 16383 characters.
The character string specified by (d) has more than 16383 characters.
(s2) is not within the range (1ï‚£(s2)ï‚£16383)
The value specified by (s2) exceeds "the number of characters of the character string (d) + 1".
3406 The character string after insertion, (s1)+(d), has more than 16383 characters.
The character string after insertion, (s1)+(d), exceeds the corresponding device range.
41H (A)42H (B)
43H (C)44H (D)
45H (E)46H (F)
47H (G)48H (H)
62H (b)
64H (d)
66H (f)
61H (a)
63H (c)
65H (e)
0000H
30H (0)31H (1)
32H (2)33H (3)
34H (4)
00H
41H (A)42H (B)
30H (0)31H (1)
32H (2)33H (3)
34H (4)43H (C)
44H (D)45H (E)
47H (G)
00H
66H (f)
46H (F)
48H (H)
65H (e)
(d)
(d)+1
(d)+2
(d)+3
(d)+4
(d)+5
(d)+6
(d)+7
(s1)
(s1)+1
(s1)+2
3
(s2)
b15 b0b7b8
b15 b0
b7b8
b15 b0
b7b8
(d)
(d)+1
(d)+2
(d)+3
(d)+4
(d)+5
(d)+6
(d)+7
The character string data of the
3rd character and later is
shifted leftward by 5 characters,
and "01234" is inserted.
Insertion start position (s2):
3rd character
The inserted
character
string data (s1)
The character string data of (d)+5 and
later before insertion is overwritten for the
number of character to be inserted.