Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->FF1

FF1    Find First One in Register

Compatibility:    MCF5282 and MCF5280.

Bit offset of the first logical one in Dx -> Dx
    
Assembler Syntax:FF1.L  Dx
Size:    Long

The data register is scanned beginning from the most-significant bit (Dx[31]) and ending with the lease-significant bit (Dx[0]) searching for the first bit set.  The data register is then loaded with the offset count from bit 31 where the first bit set appears.  If the data source is zero then an offset if 32 is returned.

Condition Codes:

N  Set if source was negative, else cleared
Z  Set if source was zero, else cleared
V  Always cleared
C Always cleared
X  Not affected