![Omron CJ1G-CPUxx Instructions Manual Download Page 1063](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_7424911063.webp)
1042
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
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...