pub fn load_reg_a_a16(cpu: &mut CPU) -> u8 {
    let addr = cpu.fetch16();

    // Read 8-bit value
    let value = cpu.mmu.read8(addr);

    cpu.registers.a = value;

    16
}
/// Load the A register with a value from memory, using a 16-bit value as an address.
///
/// Takes 16 cycles.
///
/// # Examples
///
/// ```asm
/// LD A, ($0150) ; A <- memory[0x0150]
/// ```
Load the A register with a value from memory, using a 16-bit value as an address.
Takes 16 cycles.
Load the A register with a value from memory using a 16 - bit value as an address . Takes 16 cycles .
pub fn load_reg_a_a16(cpu: &mut CPU) -> u8 {
    let addr = cpu.fetch16();
    // Read 8-bit value
    let value = cpu.mmu.read8(addr);
    cpu.registers.a = value;
    16
}
pub fn load_reg_a_a16 ( cpu : & mut CPU ) -> u8 { let addr = cpu . fetch16 ( ) ; // Read 8-bit value let value = cpu . mmu . read8 ( addr ) ; cpu . registers . a = value ; 16 }
Load the A register with a value from memory, using a 16-bit value as an address.
Load the A register with a value from memory using a 16 - bit value as an address .
cpu
&mut CPU
cpu
&mut CPU
examples
None