682
7 APPLICATION INSTRUCTIONS
7.8 String Processing Instructions
• These instruction convert the Unicode character string in the device specified by (s) to the shift JIS character string, and
stores the converted data in the device specified by (d).
• The Unicode character string in the device specified by (s) should be specified in little endian.
• When a byte order mark is not used, conversion from Unicode to shift JIS occurs as follows.
• When a byte order mark (FEFFH) is added, conversion from Unicode to shift JIS occurs as follows.
*1 A two-byte character such as a kanji character represented in shift JIS code should be counted 2.
Error code
(SD0)
Description
2821H The ranges of data in the devices specified by (s) and (d) are overlapping.
3401H Byte order mark FEFFH (big endian) is added to the character string in the device specified by (s).
The range of data in the device specified by (s) includes a character code that cannot be converted.
3405H The character string in the device specified by (s) exceeds 16383 characters.
*1
(s)
(d)
D100
D101
b15 b8 b7 b0b15 b0
D0
D1
D2
D3
SM402
(s) (d)
M0
$MOVP_WS D0
WS2SJISP D0 D100
0000H
4100H
4200H
4300H
(A)
(B)
(C)
41H42H
43H00H
(BA)
(C)
"ABC"
(s)
D0
D1
D2
D3
D4
(d)
D100
D101
b15 b8 b7 b0b15 b0
FFFEH
SM402
(s) (d)
M0
$MOVP_WSB D0
WS2SJISP D0 D100
"123"
0000H
3100H
3200H
3300H
(1)
(2)
(3)
Byte order
mark
31H32H
33H00H
(21)
(3)