pub fn ret_conditional(cpu: &mut CPU, opcode: u8) -> u8 {
    if opcode_flag_test(opcode, cpu.registers.f) {
        ret(cpu);

        20
    } else {
        8
    }
}
/// Return to an address that was pushed to the stack if a given flag status condition matches.
///
/// Takes 20 cycles if condition matches, 8 cycles if it doesn't match.
///
/// # Examples
///
/// ```asm
/// RET ; PC <<- STACK;
/// ```
Return to an address that was pushed to the stack if a given flag status condition matches.
Takes 20 cycles if condition matches, 8 cycles if it doesn't match.
Return to an address that was pushed to the stack if a given flag status condition matches . Takes 20 cycles if condition matches 8 cycles if it doesn ' t match .
pub fn ret_conditional(cpu: &mut CPU, opcode: u8) -> u8 {
    if opcode_flag_test(opcode, cpu.registers.f) {
        ret(cpu);
        20
    } else {
        8
    }
}
pub fn ret_conditional ( cpu : & mut CPU , opcode : u8 ) -> u8 { if opcode_flag_test ( opcode , cpu . registers . f ) { ret ( cpu ) ; 20 } else { 8 } }
Return to an address that was pushed to the stack if a given flag status condition matches.
Return to an address that was pushed to the stack if a given flag status condition matches .
cpu
&mut CPU
opcode
u8
cpu
&mut CPU
opcode
u8
examples
None