BIT

Test Bits in Memory with Accumulator

Operation:  A /\ M -> Z, M7 -> N, M6 -> V

N V - B D I Z C
M7M6. . . . / .

Bit 6 and 7 are transferred to the status register.
If the result of A /\ M is zero then Z = 1, otherwise Z=0.

Addressing ModeAssembly Language FormOP CODENo. BytesNo. Cycles
ZeroPageBIT $FF$2423
AbsoluteBIT $FFFF$2C34

For penalty cycles on the 65816, check the desired addressing mode.