pub fn jump_relative_d8(cpu: &mut CPU) -> u8 {
    // Read signed 8-bit jump offset
    let jump_offset: i8 = cpu.fetch8() as i8;

    // Jump PC to that target address
    cpu.registers.pc = cpu.registers.pc.wrapping_add(jump_offset as u16);

    16
}
/// Jump to a different relative address by adding the 8-bit operand to the current PC register.
///
/// Takes 12 cycles.
///
/// # Examples
///
/// ```asm
/// JR $DA ; PC <- PC + 0xDA
/// ```
Jump to a different relative address by adding the 8-bit operand to the current PC register.
Takes 12 cycles.
Jump to a different relative address by adding the 8 - bit operand to the current PC register . Takes 12 cycles .
pub fn jump_relative_d8(cpu: &mut CPU) -> u8 {
    // Read signed 8-bit jump offset
    let jump_offset: i8 = cpu.fetch8() as i8;
    // Jump PC to that target address
    cpu.registers.pc = cpu.registers.pc.wrapping_add(jump_offset as u16);
    16
}
pub fn jump_relative_d8 ( cpu : & mut CPU ) -> u8 { // Read signed 8-bit jump offset let jump_offset : i8 = cpu . fetch8 ( ) as i8 ; // Jump PC to that target address cpu . registers . pc = cpu . registers . pc . wrapping_add ( jump_offset as u16 ) ; 16 }
Jump to a different relative address by adding the 8-bit operand to the current PC register.
Jump to a different relative address by adding the 8 - bit operand to the current PC register .
cpu
&mut CPU
cpu
&mut CPU
examples
None