pub fn swap_indirect_hl(cpu: &mut CPU) -> u8 {
    let a16_addr = cpu.registers.read16(&Reg16::HL);
    let value = cpu.mmu.read8(a16_addr);

    let (swapped_value, flags) = alu_swap_8bit(value, cpu.registers.f);
    cpu.mmu.write8(a16_addr, swapped_value);
    cpu.registers.f = flags;

    16
}
/// Swap high and low bits of an indirect value, taken from memory using a 16-bit register as an
/// address.
///
/// Takes 16 cycles.
///
/// # Examples
///
/// ```asm
/// SLA (HL) ; Shift memory[hl] left (sets Flags::ZERO if rotated result == 0)
/// ```
Swap high and low bits of an indirect value, taken from memory using a 16-bit register as an
address.

Takes 16 cycles.
Swap high and low bits of an indirect value taken from memory using a 16 - bit register as an address . Takes 16 cycles .
pub fn swap_indirect_hl(cpu: &mut CPU) -> u8 {
    let a16_addr = cpu.registers.read16(&Reg16::HL);
    let value = cpu.mmu.read8(a16_addr);
    let (swapped_value, flags) = alu_swap_8bit(value, cpu.registers.f);
    cpu.mmu.write8(a16_addr, swapped_value);
    cpu.registers.f = flags;
    16
}
pub fn swap_indirect_hl ( cpu : & mut CPU ) -> u8 { let a16_addr = cpu . registers . read16 ( & Reg16 :: HL ) ; let value = cpu . mmu . read8 ( a16_addr ) ; let ( swapped_value , flags ) = alu_swap_8bit ( value , cpu . registers . f ) ; cpu . mmu . write8 ( a16_addr , swapped_value ) ; cpu . registers . f = flags ; 16 }
Swap high and low bits of an indirect value, taken from memory using a 16-bit register as an
address.
Swap high and low bits of an indirect value taken from memory using a 16 - bit register as an address .
cpu
&mut CPU
cpu
&mut CPU
examples
```asm
SLA (HL) ; Shift memory[hl] left (sets Flags::ZERO if rotated result == 0)
```
` ` ` asm SLA ( HL ) ; Shift memory [ hl ] left ( sets Flags :: ZERO if rotated result == 0 ) ` ` `