/// Increment by 1 register, without affecting carry flag
Increment by 1 register, without affecting carry flag
Increment by 1 register without affecting carry flag
pub fn inc(rdu: usize, register_bank: &mut RegisterBank) {
        let res = register_bank.registers[rdu].wrapping_add(1);
        register_bank.registers[rdu] = res;
        let mut flags = register_bank.get_flags();
        flags.zero = res == 0;
        flags.neg = res & 0x80 != 0;
        flags.over = res == 0x80;
        flags.sign = flags.neg ^ flags.over;
        register_bank.set_flags(flags);
    }
pub fn inc ( rdu : usize , register_bank : & mut RegisterBank ) { let res = register_bank . registers [ rdu ] . wrapping_add ( 1 ) ; register_bank . registers [ rdu ] = res ; let mut flags = register_bank . get_flags ( ) ; flags . zero = res == 0 ; flags . neg = res & 0x80 != 0 ; flags . over = res == 0x80 ; flags . sign = flags . neg ^ flags . over ; register_bank . set_flags ( flags ) ; }
Increment by 1 register, without affecting carry flag
Increment by 1 register without affecting carry flag
rdu
usize
register_bank
&mut RegisterBank