Specifications

4.4 Method for Specifying Data
4.4.5 String data
4-33
4
PROGRAM
CONFIGURATION
4.4.5 String data
String data are character data used in basic instructions and application instructions.
From the specified character to the NULL code (00H) that indicates the end of the character
string are the target string data.
(1) When the specified character is NULL code
The NULL code is stored by using one word.
(2) When the number of characters is an even number
Character string data and NULL code are stored by using the 'number of characters /2+1'
words.
For example, when 'ABCD' is transferred to word devices starting from D0, the character
string 'ABCD' is stored to D0 and D1, and the NULL code to D2. (The NULL code is stored to
the last one word).
(3) When the number of characters is an odd number
Character string data and NULL code are stored by using the 'number of characters /2'
words (Rounding the fractional part).
For example, when 'ABCDE' is transferred to word devices starting from D0, the character
string 'ABCDE' and the NULL code are stored to D0 to D2. (The NULL code is stored to the
higher 8 bits of the last one word).
M0
$MOV
EN ENO
ds
Var_D0" "
D0
NULL
Specification of NULL code (00
H)
Transfers character string data
"ABC
D"
D0
42
H
44H
41H
43H
NULL
D1
D2
Transfers character string data
Specification of a character string
composed of even numbers
M0
$MOV
EN ENO
ds
Var_D0
"ABCDE"
D0
D1
D2
Transfers character string data
Specification of a character string
composed of odd numbers
M0
$MOV
EN ENO
ds
Var_D0
42
H
44H
41H
43H
NULL 45H