pub fn dec_indirect_r16(cpu: &mut CPU, r16: &Reg16) -> u8 {
    let a16_addr = cpu.registers.read16(r16);
    let d8 = cpu.mmu.read8(a16_addr);

    let (value, flags) = alu_dec_8bit(d8, cpu.registers.f);
    cpu.registers.f = flags;

    cpu.mmu.write8(a16_addr, value);

    12
}
/// Decrement memory using a 16-bit register as an address.
///
/// Takes 12 cycles.
///
/// # Examples
///
/// ```asm
/// DEC (HL)
/// ```
Decrement memory using a 16-bit register as an address.
Takes 12 cycles.
Decrement memory using a 16 - bit register as an address . Takes 12 cycles .
pub fn dec_indirect_r16(cpu: &mut CPU, r16: &Reg16) -> u8 {
    let a16_addr = cpu.registers.read16(r16);
    let d8 = cpu.mmu.read8(a16_addr);
    let (value, flags) = alu_dec_8bit(d8, cpu.registers.f);
    cpu.registers.f = flags;
    cpu.mmu.write8(a16_addr, value);
    12
}
pub fn dec_indirect_r16 ( cpu : & mut CPU , r16 : & Reg16 ) -> u8 { let a16_addr = cpu . registers . read16 ( r16 ) ; let d8 = cpu . mmu . read8 ( a16_addr ) ; let ( value , flags ) = alu_dec_8bit ( d8 , cpu . registers . f ) ; cpu . registers . f = flags ; cpu . mmu . write8 ( a16_addr , value ) ; 12 }
Decrement memory using a 16-bit register as an address.
Decrement memory using a 16 - bit register as an address .
cpu
&mut CPU
r16
&Reg16
cpu
&mut CPU
r16
&Reg16
examples
None