def RotateRightWithCarry(cpu, unused, source):
    """ From z80 Heaven:
    8-bit rotation to the right. the bit leaving on the right is copied into the carry, and into bit 7.
    """
    # Fairly similar to above, but note that bit 0 is copied both to bit 7 and 8 (carry set/reset)
    return (source >> 1) | ((source & 1) << 8) | ((source & 1) << 7)