pub fn ret(cpu: &mut CPU) -> u8 {
    // Read 16-bit jump target address
    let jump_target: u16 = pop_stack_d16(cpu);

    // Jump PC to the target address
    cpu.registers.pc = jump_target;

    16
}
/// Return to an address that was pushed to the stack.
///
/// Takes 16 cycles.
///
/// # Examples
///
/// ```asm
/// RET ; PC <<- STACK;
/// ```
Return to an address that was pushed to the stack.
Takes 16 cycles.
Return to an address that was pushed to the stack . Takes 16 cycles .
pub fn ret(cpu: &mut CPU) -> u8 {
    // Read 16-bit jump target address
    let jump_target: u16 = pop_stack_d16(cpu);
    // Jump PC to the target address
    cpu.registers.pc = jump_target;
    16
}
pub fn ret ( cpu : & mut CPU ) -> u8 { // Read 16-bit jump target address let jump_target : u16 = pop_stack_d16 ( cpu ) ; // Jump PC to the target address cpu . registers . pc = jump_target ; 16 }
Return to an address that was pushed to the stack.
Return to an address that was pushed to the stack .
cpu
&mut CPU
cpu
&mut CPU
examples
None