pub fn load_r8_indirect_r16(cpu: &mut CPU, r8_target: &Reg8, r16_indirect_addr: &Reg16) -> u8 {
    let indirect_addr = cpu.registers.read16(r16_indirect_addr);
    let value = cpu.mmu.read8(indirect_addr);
    cpu.registers.write8(r8_target, value);

    8
}
/// Load an 8-bit register with an indirect value, taken from memory using a 16-bit register as an
/// address.
///
/// Takes 8 cycles.
///
/// # Examples
///
/// ```asm
/// LD A, (HL) ; A <- memory[HL]
/// ```
Load an 8-bit register with an indirect value, taken from memory using a 16-bit register as an
address.

Takes 8 cycles.
Load an 8 - bit register with an indirect value taken from memory using a 16 - bit register as an address . Takes 8 cycles .
pub fn load_r8_indirect_r16(cpu: &mut CPU, r8_target: &Reg8, r16_indirect_addr: &Reg16) -> u8 {
    let indirect_addr = cpu.registers.read16(r16_indirect_addr);
    let value = cpu.mmu.read8(indirect_addr);
    cpu.registers.write8(r8_target, value);
    8
}
pub fn load_r8_indirect_r16 ( cpu : & mut CPU , r8_target : & Reg8 , r16_indirect_addr : & Reg16 ) -> u8 { let indirect_addr = cpu . registers . read16 ( r16_indirect_addr ) ; let value = cpu . mmu . read8 ( indirect_addr ) ; cpu . registers . write8 ( r8_target , value ) ; 8 }
Load an 8-bit register with an indirect value, taken from memory using a 16-bit register as an
address.
Load an 8 - bit register with an indirect value taken from memory using a 16 - bit register as an address .
cpu
&mut CPU
r8_target
&Reg8
r16_indirect_addr
&Reg16
cpu
&mut CPU
r8_target
&Reg8
r16_indirect_addr
&Reg16
examples
None