Fujitsu FR81 Computer Hardware User Manual


 
CM71-00105-1E FUJITSU MICROELECTRONICS LIMITED 377
FR81 Family
CHAPTER 7 DETAILED EXECUTION INSTRUCTIONS
7.148
7.148 SRCHC (Search First bit value change position distance
From MSB)
This is a Change point search instruction used for bit searching. Takes a comparison
of data in Ri with MSB (bit31), stores in Ri the distance from the first varying bit value
that is found and bit MSB (bit31).
Assembler Format
SRCHC Ri
Operation
search_change(Ri) Ri
If the values of all bits are the same, 32 is stored in Ri. In case the values of MSB (bit31) the adjacent bit30
is different, 1 is stored in Ri and 31 is stored in Ri when only the value of LSB (bit0) is different.
The Ri bit pattern before execution of instruction its relation with the values stored in Ri is shown in Table
7.148-1.
Table 7.148-1 Input bit pattern of SRCHC instruction and its results
Input (Ri bit pattern before execution of instruction) Results Remarks
00000000_00000000_00000000_00000000
11111111_11111111_11111111_11111111
32 Not found
01xxxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxx
10xxxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxx
1
Difference between bit value of
MSB(bit31) and bit30
001xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxx
110xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxx
2
0001xxxx_xxxxxxxx_xxxxxxxx_xxxxxxxx
1110xxxx_xxxxxxxx_xxxxxxxx_xxxxxxxx
3
00001xxx_xxxxxxxx_xxxxxxxx_xxxxxxxx
11110xxx_xxxxxxxx_xxxxxxxx_xxxxxxxx
4
. . .
00000000_00000000_00000000_00001xxx
11111111_11111111_11111111_11110xxx
28
00000000_00000000_00000000_000001xx
11111111_11111111_11111111_111110xx
29
00000000_00000000_00000000_0000001x
11111111_11111111_11111111_1111110x
30
00000000_00000000_00000000_00000001
11111111_11111111_11111111_11111110
31
Bit value of only LSB(bit0) is
different
* The value of result (Ri) can not become 0.