19.3 Data Table for String Instructions
■
Data table structure
● Data handled by a string instruction store the number of characters in the initial word, and
character data in the subsequent words.
● The maximum available size for string data is 4,096 bytes.
Character 2 (Byte 1)
Character 4 (Byte 3)
Character 6 (Byte 5)
Character 8 (Byte 7)
Character 1 (Byte 0)
Character 3 (Byte 2)
Character 5 (Byte 4)
Character 7 (Byte 6)
No. of characters
[S+1]
[S+2]
[S+3]
[S+4]
・・・ ・・・
No. of characters in a character string
Character data
Higher bytes
Lower bytes
[S]
Example) A string data table is specified with the number of characters: 5, and
character data: "ABCDE"
H42 (B)
H44 (D)
H41 (A)
H43 (C)
H45 (E)
5 (no. of characters)
・・・ ・・・
No. of characters in a character string
Character data
Higher bytes
Lower bytes
DT0
DT1
DT2
DT3
DT4
■
Conversion of string data using the SSET instruction
● Using the SSET instruction, a given string can be easily converted into a string data table.
● The maximum size of string data that can be specified for the SSET instruction is 256 bytes.
Example) Convert string data "ABCDE"
The number of characters is stored in DT0, and ASCII-converted character data are stored in
DT1 and subsequent data registers.
19.3 Data Table for String Instructions
WUME-FP7CPUPGR-12 19-5