GameBoy\Opcode::opcode142 PHP Method

opcode142() public static method

ADC A, (HL)
public static opcode142 ( Core $core )
$core Core
    public static function opcode142(Core $core)
    {
        $tempValue = $core->memoryRead($core->registersHL);
        $dirtySum = $core->registerA + $tempValue + ($core->FCarry ? 1 : 0);
        $core->FHalfCarry = ($core->registerA & 0xf) + ($tempValue & 0xf) + ($core->FCarry ? 1 : 0) > 0xf;
        $core->FCarry = $dirtySum > 0xff;
        $core->registerA = $dirtySum & 0xff;
        $core->FZero = $core->registerA == 0;
        $core->FSubtract = false;
    }
Opcode