user manual

8XC251SA, SB, SP, SQ USER’S MANUAL
A-118
RRC A
Function: Rotate accumulator right through carry flag
Description: Rotates the eight bits in the accumulator and the CY flag one bit to the right. Bit 0 moves into
the CY flag position; the original value of the CY flag moves into the bit 7 position.
Flags:
Example: The accumulator contains 0C5H (11000101B) and the CY flag is clear. After executing the
instruction
RRC A
the accumulator contains 62 (01100010B) and the CY flag is set.
Binary Mode Source Mode
Bytes: 11
States: 11
Hex Code in: Binary Mode = [Encoding]
Source Mode = [Encoding]
Operation: RRC
(A).a (A).a+1
(A).7 (CY)
(CY)(A).0
SETB <bit>
Function: Set bit
Description: Sets the specified bit to one. SETB can operate on the CY flag or any directly addressable
bit.
Flags: No flags are affected except the CY flag for instruction with CY as the operand.
Example: The CY flag is clear and output Port 1 contains 34H (00110100B). After executing the
instruction sequence
SETB CY
SETB P1.0
the CY flag is set and output Port 1 contains 35H (00110101B).
CY AC OV N Z
——✓✓
[Encoding] 0 0 0 1 0 0 1 1
CY AC OV N Z
————