fn rra(cpu: &mut Cpu) {
    let a = cpu.a();

    let newcarry = (a & 1) != 0;
    let oldcarry = cpu.carry() as u8;

    cpu.set_a((a >> 1) | (oldcarry << 7));

    cpu.set_carry(newcarry);
    cpu.set_zero(false);
    cpu.set_halfcarry(false);
    cpu.set_substract(false);
}
/// Rotate `A` right through carry
Rotate `A` right through carry
Rotate ` A ` right through carry
fn rra(cpu: &mut Cpu) {
    let a = cpu.a();
    let newcarry = (a & 1) != 0;
    let oldcarry = cpu.carry() as u8;
    cpu.set_a((a >> 1) | (oldcarry << 7));
    cpu.set_carry(newcarry);
    cpu.set_zero(false);
    cpu.set_halfcarry(false);
    cpu.set_substract(false);
}
fn rra ( cpu : & mut Cpu ) { let a = cpu . a ( ) ; let newcarry = ( a & 1 ) != 0 ; let oldcarry = cpu . carry ( ) as u8 ; cpu . set_a ( ( a >> 1 ) | ( oldcarry << 7 ) ) ; cpu . set_carry ( newcarry ) ; cpu . set_zero ( false ) ; cpu . set_halfcarry ( false ) ; cpu . set_substract ( false ) ; }
Rotate `A` right through carry
Rotate ` A ` right through carry
cpu
&mut Cpu
cpu
&mut Cpu