fn rrca(gb: &mut GameBoy) {
    let a = gb.cpu.get_8(Register8::A);
    let first = a << 7;
    let rotated = a >> 1 | first;

    gb.cpu.set_8(Register8::A, rotated);
    gb.cpu.set_flag(Flag::C, first == 0b1);
    gb.cpu.set_flag(Flag::N, false);
    gb.cpu.set_flag(Flag::H, false);
}
/// The  register is shifted right by one,  and the 0 bit goes to the
/// carry flag and to the 7th bit.  Flags apart from the carry are as for RLCA.
The  register is shifted right by one,  and the 0 bit goes to the
carry flag and to the 7th bit.  Flags apart from the carry are as for RLCA.
The register is shifted right by one and the 0 bit goes to the carry flag and to the 7th bit . Flags apart from the carry are as for RLCA .
fn rrca(gb: &mut GameBoy) {
    let a = gb.cpu.get_8(Register8::A);
    let first = a << 7;
    let rotated = a >> 1 | first;
    gb.cpu.set_8(Register8::A, rotated);
    gb.cpu.set_flag(Flag::C, first == 0b1);
    gb.cpu.set_flag(Flag::N, false);
    gb.cpu.set_flag(Flag::H, false);
}
fn rrca ( gb : & mut GameBoy ) { let a = gb . cpu . get_8 ( Register8 :: A ) ; let first = a << 7 ; let rotated = a >> 1 | first ; gb . cpu . set_8 ( Register8 :: A , rotated ) ; gb . cpu . set_flag ( Flag :: C , first == 0b1 ) ; gb . cpu . set_flag ( Flag :: N , false ) ; gb . cpu . set_flag ( Flag :: H , false ) ; }
The  register is shifted right by one,  and the 0 bit goes to the
carry flag and to the 7th bit.
The register is shifted right by one and the 0 bit goes to the carry flag and to the 7th bit .
gb
&mut GameBoy