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

    // Push current PC to the stack
    let current_pc = cpu.registers.pc;
    push_stack_d16(cpu, current_pc);

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

    24
}
/// Jump to a different address using 16-bit data as an address after first pushing the current PC
/// to the stack.
///
/// Takes 24 cycles.
///
/// # Examples
///
/// ```asm
/// CALL $0150 ; STACK <<- PC; PC <- 0x0150
/// ```
Jump to a different address using 16-bit data as an address after first pushing the current PC
to the stack.

Takes 24 cycles.
Jump to a different address using 16 - bit data as an address after first pushing the current PC to the stack . Takes 24 cycles .
pub fn call_d16(cpu: &mut CPU) -> u8 {
    // Read 16-bit jump target address
    let jump_target = cpu.fetch16();
    // Push current PC to the stack
    let current_pc = cpu.registers.pc;
    push_stack_d16(cpu, current_pc);
    // Jump PC to the target address
    cpu.registers.pc = jump_target;
    24
}
pub fn call_d16 ( cpu : & mut CPU ) -> u8 { // Read 16-bit jump target address let jump_target = cpu . fetch16 ( ) ; // Push current PC to the stack let current_pc = cpu . registers . pc ; push_stack_d16 ( cpu , current_pc ) ; // Jump PC to the target address cpu . registers . pc = jump_target ; 24 }
Jump to a different address using 16-bit data as an address after first pushing the current PC
to the stack.
Jump to a different address using 16 - bit data as an address after first pushing the current PC to the stack .
cpu
&mut CPU
cpu
&mut CPU
examples
None