GameBoy\Opcode::opcode140 PHP Method

opcode140() public static method

ADC A, H
public static opcode140 ( Core $core )
$core Core
    public static function opcode140(Core $core)
    {
        $tempValue = $core->registersHL >> 8;
        $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