Chapter 6 Instruction Details
XBC E-Type Main Unit 6-257 Ve r. 1
6.34.15 FIND, FINDP
Instruction
Step
P M K F L T C S Z D.x
R.x
U N D R
FIND(P)
4~7 O - -
Operand Description Data Type
S1 Start address of string to be searched for STRING
S2 Start address of string to search for STRING
N Start position to search for string WORD
[Flag Setting]
Error
1.If S1, S2’s string length exceeds the maximum string size
2.If start
position to search specified in N is larger than string’s length to be searched for,
specified in S1
F110
1) FIND
It searches starting Nth character of specified string S1 for the string with starting S2. Then saves the first
identical string’s start position in D.
2) Program Example
P00000
FIND P1000 P1100 P1200 P1300
Distance from the S1’s start position saved.