pub fn load_indirect_r16_d8(cpu: &mut CPU, r16_indirect_addr: &Reg16) -> u8 {
    // Read 8-bit value
    let value = cpu.fetch8();

    // Copy from source register to memory using indirect register
    let indirect_addr = cpu.registers.read16(r16_indirect_addr);
    cpu.mmu.write8(indirect_addr, value);

    12
}
/// Load memory, using a 16-bit register as an address, with an 8-bit value.
///
/// Takes 12 cycles.
///
/// # Examples
///
/// ```asm
/// LD (HL), $DA ; memory[HL] <- 0xDA
/// ```
Load memory, using a 16-bit register as an address, with an 8-bit value.
Takes 12 cycles.
Load memory using a 16 - bit register as an address with an 8 - bit value . Takes 12 cycles .
pub fn load_indirect_r16_d8(cpu: &mut CPU, r16_indirect_addr: &Reg16) -> u8 {
    // Read 8-bit value
    let value = cpu.fetch8();
    // Copy from source register to memory using indirect register
    let indirect_addr = cpu.registers.read16(r16_indirect_addr);
    cpu.mmu.write8(indirect_addr, value);
    12
}
pub fn load_indirect_r16_d8 ( cpu : & mut CPU , r16_indirect_addr : & Reg16 ) -> u8 { // Read 8-bit value let value = cpu . fetch8 ( ) ; // Copy from source register to memory using indirect register let indirect_addr = cpu . registers . read16 ( r16_indirect_addr ) ; cpu . mmu . write8 ( indirect_addr , value ) ; 12 }
Load memory, using a 16-bit register as an address, with an 8-bit value.
Load memory using a 16 - bit register as an address with an 8 - bit value .
cpu
&mut CPU
r16_indirect_addr
&Reg16
cpu
&mut CPU
r16_indirect_addr
&Reg16
examples
None