fn compare_register_val(&mut self, register: u8, val: u8) {
        let (sub, underflow) = register.overflowing_sub(val);
        self.set_c_from_bool((sub == 0) | !underflow);
        self.set_z_from_val(sub);
        self.set_n_from_val(sub);
    }
// used for cmp, cpx, cpy instructions
used for cmp, cpx, cpy instructions
used for cmp cpx cpy instructions
fn compare_register_val(&mut self, register: u8, val: u8) {
        let (sub, underflow) = register.overflowing_sub(val);
        self.set_c_from_bool((sub == 0) | !underflow);
        self.set_z_from_val(sub);
        self.set_n_from_val(sub);
    }
fn compare_register_val ( & mut self , register : u8 , val : u8 ) { let ( sub , underflow ) = register . overflowing_sub ( val ) ; self . set_c_from_bool ( ( sub == 0 ) | ! underflow ) ; self . set_z_from_val ( sub ) ; self . set_n_from_val ( sub ) ; }
used for cmp, cpx, cpy instructions
used for cmp cpx cpy instructions
&mut self
register
u8
val
u8
&mut self
register
u8
val
u8