pub fn call_interrupt(cpu: &mut CPU, addr: u16) -> u8 {
    // Disable further interrupts
    cpu.ime = false;

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

    // Jump to handler
    cpu.registers.pc = addr;

    12
}
/// Called internally by the CPU to jump to a different address using 16-bit interrupt handler
/// address after first pushing the current PC.
///
/// Takes 12 cycles.
Called internally by the CPU to jump to a different address using 16-bit interrupt handler
address after first pushing the current PC.

Takes 12 cycles.
Called internally by the CPU to jump to a different address using 16 - bit interrupt handler address after first pushing the current PC . Takes 12 cycles .
pub fn call_interrupt(cpu: &mut CPU, addr: u16) -> u8 {
    // Disable further interrupts
    cpu.ime = false;
    // Save current PC on the stack
    let current_pc = cpu.registers.pc;
    push_stack_d16(cpu, current_pc);
    // Jump to handler
    cpu.registers.pc = addr;
    12
}
pub fn call_interrupt ( cpu : & mut CPU , addr : u16 ) -> u8 { // Disable further interrupts cpu . ime = false ; // Save current PC on the stack let current_pc = cpu . registers . pc ; push_stack_d16 ( cpu , current_pc ) ; // Jump to handler cpu . registers . pc = addr ; 12 }
Called internally by the CPU to jump to a different address using 16-bit interrupt handler
address after first pushing the current PC.
Called internally by the CPU to jump to a different address using 16 - bit interrupt handler address after first pushing the current PC .
cpu
&mut CPU
addr
u16
cpu
&mut CPU
addr
u16