/// Divide two values and set the flags accordingly
Divide two values and set the flags accordingly
Divide two values and set the flags accordingly
fn div(cpu: &mut Cpu, a: i16, b: i16) -> i16 {
    let (res, o) = a.overflowing_div(b);
    cpu.set_overflow(o);
    cpu.set_carry(a % b > 0);
    res
}
fn div ( cpu : & mut Cpu , a : i16 , b : i16 ) -> i16 { let ( res , o ) = a . overflowing_div ( b ) ; cpu . set_overflow ( o ) ; cpu . set_carry ( a % b > 0 ) ; res }
Divide two values and set the flags accordingly
Divide two values and set the flags accordingly
cpu
&mut Cpu
a
i16
b
i16