Rotate instructions operate in a fashion similar to shift instructions. A rotated operand is first shifted in the direction indicated by the instruction. The empty bit created by the shift (LSB for left and MSB for right) takes the state of the condition code register carry (C) bit, and the carry bit takes the state of the bit shifted out of the operand (MSB for left and LSB for right).
The BIT instruction sets the condition code register negative (N) or (Z) flags based on the logical AND of the accumulator and an operand. The result of this logical AND is discarded.
The compare instructions allow subsequent branch operations to determine if an argument is equal to, not equal to, greater than, greater than or equal to, less than, or less than or equal to the value in the designated register.
A register and an operand are "compared" by non-destructively subtracting the operand from the register and setting the condition code register C, N, or Z bits.
The test instructions set the negative and zero flags by non-destructively subtracting zero from a memory location (TST), the accumulator (TSTA), or the index register (TSTX).