n--------------m | n---------m | n--m v->|7------>0|-T->|CY| v---------u v--u r

RRC

r

b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | |
---|---|---|---|---|---|---|---|---|

1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | $CB |

0 | 0 | 0 | 0 | 1 | r |

The contents of register r are rotated right 1 bit position. The contents of bit 0 are copied to the Carry flag and also to bit 7. Bit 0 is the least significant bit. In the assembled object code, operand r is specified as follows:

Register | r | Hex |
---|---|---|

A | 111 | $0F |

B | 000 | $08 |

C | 001 | $09 |

D | 010 | $0A |

E | 011 | $0B |

H | 100 | $0C |

L | 101 | $0D |

S | is set if result is negative, otherwise it is reset. |

Z | is set if result is 0, otherwise it is reset. |

H | is reset. |

P/V | is set if parity even, otherwise it is reset |

N | is reset. |

C | is data from bit 0 of source register. |

Register C contains the following data:

7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|

0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 |

Upon the execution of

RRC C

register C and the Carry Flag now contain:

7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | C | |
---|---|---|---|---|---|---|---|---|---|

1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 |