pub fn load_r16_d16(cpu: &mut CPU, r16: &Reg16) -> u8 {
    // Read 16-bit value
    let value: u16 = cpu.fetch16();

    // Write it to the register
    cpu.registers.write16(r16, value);

    12
}
/// Load a 16-bit value into a 16-bit register.
///
/// Takes 12 cycles.
///
/// # Examples
///
/// ```asm
/// LD SP, $FFFE
/// LD HL, $9FFF
/// ```
Load a 16-bit value into a 16-bit register.
Takes 12 cycles.
Load a 16 - bit value into a 16 - bit register . Takes 12 cycles .
pub fn load_r16_d16(cpu: &mut CPU, r16: &Reg16) -> u8 {
    // Read 16-bit value
    let value: u16 = cpu.fetch16();
    // Write it to the register
    cpu.registers.write16(r16, value);
    12
}
pub fn load_r16_d16 ( cpu : & mut CPU , r16 : & Reg16 ) -> u8 { // Read 16-bit value let value : u16 = cpu . fetch16 ( ) ; // Write it to the register cpu . registers . write16 ( r16 , value ) ; 12 }
Load a 16-bit value into a 16-bit register.
Load a 16 - bit value into a 16 - bit register .
cpu
&mut CPU
r16
&Reg16
cpu
&mut CPU
r16
&Reg16
examples
None