Special Instructions
Limitations
Description
1,2,3...
Flags
Example
00001
404
N must be BCD between 0001 to 9999.
R
and R
+N–1 must be in the same data area.
1
1
DM 6143 to DM 6655 cannot be used for C.
When the execution condition is OFF, SRCH(––) is not executed. When the
execution condition is ON, SRCH(––) searches the range of memory from R
to R
+N–1 for addresses that contain the comparison data in C. If one or
1
more addresses contain the comparison data, the EQ Flag (SR 25506) is
turned ON and the lowest address containing the comparison data is identi-
fied in C+1. The address is identified differently for the DM area:
1. For an address in the DM area, the word address is written to C+1. For ex-
ample, if the lowest address containing the comparison data is DM 0114,
then #0114 is written in C+1.
2. For an address in another data area, the number of addresses from the be-
ginning of the search is written to C+1. For example, if the lowest address
containing the comparison data is IR 114 and the first word in the search
range is IR 014, then #0100 is written in C+1.
If none of addresses in the range contain the comparison data, the EQ Flag
(SR 25506) is turned OFF and C+1 is left unchanged.
ER:
Indirectly addressed EM/DM word is non-existent.
(Content of *EM/*DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
N is not BCD between 0001 and 9999.
EQ:
ON when the comparison data has been matched in the search
range.
In the following example, the 10 word range from DM 0010 to DM 0019 is
searched for addresses that contain the same data as DM 0000 (#FFFF).
Since DM 0012 contains the same data, the EQ Flag (SR 25506) is turned
ON and #0012 is written to DM 0001.
@SRCH(−−)
#0010
DM 0010
DM 0000
DM 0010
0000
DM 0011
9898
DM 0012
FFFF
DM 0013
9797
DM 0014
AAAA
DM 0015
9595
DM 0016
1414
DM 0017
0000
DM 0018
0000
DM 0019
FFFF
Address Instruction
00000
LD
00001
@SRCH(−−)
#
DM
DM
DM 0000
DM 0001
Section 5-28
1
Operands
00001
0010
0010
0000
FFFF
0012
Need help?
Do you have a question about the CQM1H - PROGRAM and is the answer not in the manual?