pub fn alu_shift_left(d8: u8, flags: Flags) -> (u8, Flags) {
    let high_bit = d8 & 0x80;
    let shifted_value = d8 << 1;

    let mut new_flags = flags;
    new_flags.set(Flags::ZERO, shifted_value == 0);
    new_flags.set(Flags::SUBTRACT, false);
    new_flags.set(Flags::HALF_CARRY, false);
    new_flags.set(Flags::CARRY, high_bit != 0);

    (shifted_value, new_flags)
}
/// Shift an 8-bit value to the left.
///
Shift an 8-bit value to the left.
Shift an 8 - bit value to the left .
pub fn alu_shift_left(d8: u8, flags: Flags) -> (u8, Flags) {
    let high_bit = d8 & 0x80;
    let shifted_value = d8 << 1;
    let mut new_flags = flags;
    new_flags.set(Flags::ZERO, shifted_value == 0);
    new_flags.set(Flags::SUBTRACT, false);
    new_flags.set(Flags::HALF_CARRY, false);
    new_flags.set(Flags::CARRY, high_bit != 0);
    (shifted_value, new_flags)
}
pub fn alu_shift_left ( d8 : u8 , flags : Flags ) -> ( u8 , Flags ) { let high_bit = d8 & 0x80 ; let shifted_value = d8 << 1 ; let mut new_flags = flags ; new_flags . set ( Flags :: ZERO , shifted_value == 0 ) ; new_flags . set ( Flags :: SUBTRACT , false ) ; new_flags . set ( Flags :: HALF_CARRY , false ) ; new_flags . set ( Flags :: CARRY , high_bit != 0 ) ; ( shifted_value , new_flags ) }
Shift an 8-bit value to the left.
Shift an 8 - bit value to the left .
d8
u8
flags
Flags
d8
u8
flags
Flags