![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_7422681292.webp)
1253
Text String Processing Instructions
Section 3-33
LD<=$, AND<=$, OR<=$
LD>$, AND>$, OR>$
LD>=$, AND>=$, OR>=$
The following table provides details on these instructions.
Comparison Methods
The comparison methods are as follows:
The first character (byte) of each text string is compared with its counterpart
from the other string as ASCII code. If the two ASCII codes are not equal,
then that greater/lesser relationship becomes the greater/lesser relationship
for the two text strings. If the two ASCII codes are equal, the next characters
are compared. If these two ASCII codes are not equal, then, that greater/
lesser relationship becomes the greater/lesser relationship for the two text
strings.
In this manner, the two text strings are compared in order, character by char-
acter. If all of the characters, including the NUL, are equal, then the two text
strings will have an equal relationship.
If the two text strings are of differing lengths, then the NUL (00 hex) will be
added to the shorter of the two strings to fill in the difference, and the compar-
ison will be made on that basis.
Comparison Examples
AD (414400 hex) and BC (424300 hex):
AD < BC, because at the beginning of the text strings 41 (hex) is less than 42
(hex).
Mnemonic (including
function code)
Name
Function
LD=$(670)
LOAD STRING EQUALS
True when S1 text string
equals S2 text string.
AND=$(670)
AND STRING EQUALS
OR=$(670)
OR STRING EQUALS
LD<>$(671)
LOAD STRING NOT EQUAL True when S1 text string
does not equal S2 text string.
AND<>$(671)
AND STRING NOT EQUAL
OR<>$(671)
OR STRING NOT EQUAL
LD<$(672)
LOAD STRING LESS THAN
True when S1 text string is
less than S2 text string.
AND<$(672)
AND STRING LESS THAN
OR<$(672)
OR STRING LESS THAN
LD<=$(673)
LOAD STRING LESS THAN
OR EQUALS
True when S1 text string is
less than or equal to S2 text
string.
AND<=$(673)
AND STRING LESS THAN
OR EQUALS
OR<=$(673)
OR STRING LESS THAN
OR EQUALS
LD>$(674)
LOAD STRING GREATER
THAN
True when S1 text string is
greater than S2 text string.
AND>$(674)
AND STRING GREATER
THAN
OR>$(674)
OR STRING GREATER
THAN
LD>=$(675)
LOAD STRING GREATER
THAN OR EQUALS
True when S1 text string is
greater than or equal to S2
text string.
AND>=$(675)
AND STRING GREATER
THAN OR EQUALS
OR>=$(675)
OR STRING GREATER
THAN OR EQUALS
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...