pub(super) fn rotate_left9(a: u8, flags: Flags) -> (u8, Flags) {
    let rotated = a.rotate_left(1);
    // Pull the carry flag into the first bit.
    let res = rotated & 0xfe | flags.contains(Flags::CARRY) as u8;
    // Set the carry flag based on the bit that was rotated out of max position.
    let flags = Flags::check_carry(rotated & 1 != 0) | Flags::check_zero(res);
    (res, flags)
}
/// Helper to perform a 9-bit rotation through the carry flag. Returns flags with:
/// * ZERO is set if the result is zero.
/// * SUB is never set.
/// * CARRY is set to the value of the MSB of a.
/// * HALFCARRY is never set.
Helper to perform a 9-bit rotation through the carry flag. Returns flags with:
ZERO is set if the result is zero.
SUB is never set.
CARRY is set to the value of the MSB of a.
HALFCARRY is never set.
Helper to perform a 9 - bit rotation through the carry flag . Returns flags with : ZERO is set if the result is zero . SUB is never set . CARRY is set to the value of the MSB of a . HALFCARRY is never set .
pub(super) fn rotate_left9(a: u8, flags: Flags) -> (u8, Flags) {
    let rotated = a.rotate_left(1);
    // Pull the carry flag into the first bit.
    let res = rotated & 0xfe | flags.contains(Flags::CARRY) as u8;
    // Set the carry flag based on the bit that was rotated out of max position.
    let flags = Flags::check_carry(rotated & 1 != 0) | Flags::check_zero(res);
    (res, flags)
}
pub ( super ) fn rotate_left9 ( a : u8 , flags : Flags ) -> ( u8 , Flags ) { let rotated = a . rotate_left ( 1 ) ; // Pull the carry flag into the first bit. let res = rotated & 0xfe | flags . contains ( Flags :: CARRY ) as u8 ; // Set the carry flag based on the bit that was rotated out of max position. let flags = Flags :: check_carry ( rotated & 1 != 0 ) | Flags :: check_zero ( res ) ; ( res , flags ) }
Helper to perform a 9-bit rotation through the carry flag.
Helper to perform a 9 - bit rotation through the carry flag .
a
u8
flags
Flags
a
u8
flags
Flags