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

    let (shifted_value, flags) = alu_shift_right(value, cpu.registers.f, reset_high_bit);
    cpu.mmu.write8(a16_addr, shifted_value);
    cpu.registers.f = flags;

    16
}
/// Shift an indirect value, taken from memory using a 16-bit register as an address to the right.
///
/// If reset_high_bit is true the highest bit after the shift will always be reset.
/// If it is not true the highest bit after the shift will be left as its original value.
///
/// Takes 16 cycles.
///
/// # Examples
///
/// ```asm
/// SRA (HL) ; Shift memory[hl] right (sets Flag::RegisterFlags::ZERO if rotated result == 0)
/// SRL (HL) ; Shift memory[hl] right (sets Flag::RegisterFlags::ZERO if rotated result == 0)
/// ```
Shift an indirect value, taken from memory using a 16-bit register as an address to the right.
If reset_high_bit is true the highest bit after the shift will always be reset.
If it is not true the highest bit after the shift will be left as its original value.

Takes 16 cycles.
Shift an indirect value taken from memory using a 16 - bit register as an address to the right . If reset_high_bit is true the highest bit after the shift will always be reset . If it is not true the highest bit after the shift will be left as its original value . Takes 16 cycles .
pub fn shift_right_indirect_hl(cpu: &mut CPU, reset_high_bit: bool) -> u8 {
    let a16_addr = cpu.registers.read16(&Reg16::HL);
    let value = cpu.mmu.read8(a16_addr);
    let (shifted_value, flags) = alu_shift_right(value, cpu.registers.f, reset_high_bit);
    cpu.mmu.write8(a16_addr, shifted_value);
    cpu.registers.f = flags;
    16
}
pub fn shift_right_indirect_hl ( cpu : & mut CPU , reset_high_bit : bool ) -> u8 { let a16_addr = cpu . registers . read16 ( & Reg16 :: HL ) ; let value = cpu . mmu . read8 ( a16_addr ) ; let ( shifted_value , flags ) = alu_shift_right ( value , cpu . registers . f , reset_high_bit ) ; cpu . mmu . write8 ( a16_addr , shifted_value ) ; cpu . registers . f = flags ; 16 }
Shift an indirect value, taken from memory using a 16-bit register as an address to the right.
Shift an indirect value taken from memory using a 16 - bit register as an address to the right .
cpu
&mut CPU
reset_high_bit
bool
cpu
&mut CPU
reset_high_bit
bool
examples
```asm
SRA (HL) ; Shift memory[hl] right (sets Flag::RegisterFlags::ZERO if rotated result == 0)
SRL (HL) ; Shift memory[hl] right (sets Flag::RegisterFlags::ZERO if rotated result == 0)
```
` ` ` asm SRA ( HL ) ; Shift memory [ hl ] right ( sets Flag :: RegisterFlags :: ZERO if rotated result == 0 ) SRL ( HL ) ; Shift memory [ hl ] right ( sets Flag :: RegisterFlags :: ZERO if rotated result == 0 ) ` ` `