Purpose: | To locate the first bit in a bit field | ||||||
Format: | opcode startpos.rl, size.rb, base.vb, findpos.wl | ||||||
Operation: |
|
||||||
Condition Codes: |
N <- 0; Z <- bit not found; V <- 0; C <- 0; |
||||||
Exceptions: | Reserved Operand | ||||||
Opcodes: |
|
||||||
Description: | A field specified by the start position, size and base operands is extracted. The field is tested for a bit in the state indicated by the instruction starting at bit 0 and extending to the highest bit in the field. If a bit in the indicated state is found, the find position operand is replaced by the position of the bit and the Z condition code is cleared.
If a bit in the indicated state is not found, the find position operand is replaced by the position (relative to the base) of the bit one bit higher than the highest bit in the field and the Z condition code is set. If the size operand is zero, the find position operand is set to the start position operand and the Z condition code is set. |
||||||
Notes: |
|