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

    cpu.registers.f = alu_cp_8bit(cpu.registers.a, cpu.registers.f, value);

    8
}
/// Subtract memory addressed indirectly by a 16-bit register from register A, but don't store the
/// result. Zero flag will be set if register A and the 8-bit value were equal.
///
/// Takes 8 cycles.
///
/// # Examples
///
/// ```asm
/// CP (HL) ; Flag::RegisterFlags::ZERO true if A == memory[HL], Flag::RegisterFlags::CARRY true if A < memory[HL]
/// ```
Subtract memory addressed indirectly by a 16-bit register from register A, but don't store the
result. Zero flag will be set if register A and the 8-bit value were equal.

Takes 8 cycles.
Subtract memory addressed indirectly by a 16 - bit register from register A but don ' t store the result . Zero flag will be set if register A and the 8 - bit value were equal . Takes 8 cycles .
pub fn cp_indirect_r16(cpu: &mut CPU, r16: &Reg16) -> u8 {
    let value = cpu.mmu.read8(cpu.registers.read16(r16));
    cpu.registers.f = alu_cp_8bit(cpu.registers.a, cpu.registers.f, value);
    8
}
pub fn cp_indirect_r16 ( cpu : & mut CPU , r16 : & Reg16 ) -> u8 { let value = cpu . mmu . read8 ( cpu . registers . read16 ( r16 ) ) ; cpu . registers . f = alu_cp_8bit ( cpu . registers . a , cpu . registers . f , value ) ; 8 }
Subtract memory addressed indirectly by a 16-bit register from register A, but don't store the
result.
Subtract memory addressed indirectly by a 16 - bit register from register A but don ' t store the result .
cpu
&mut CPU
r16
&Reg16
cpu
&mut CPU
r16
&Reg16
examples
```asm
CP (HL) ; Flag::RegisterFlags::ZERO true if A == memory[HL], Flag::RegisterFlags::CARRY true if A < memory[HL]
```
` ` ` asm CP ( HL ) ; Flag :: RegisterFlags :: ZERO true if A == memory [ HL ] Flag :: RegisterFlags :: CARRY true if A < memory [ HL ] ` ` `