GameBoy\Opcode::opcode206 PHP Méthode

opcode206() public static méthode

ADC A, n
public static opcode206 ( Core $core )
$core Core
    public static function opcode206(Core $core)
    {
        $tempValue = $core->memoryRead($core->programCounter);
        $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;
        $core->programCounter = $core->programCounter + 1 & 0xffff;
    }
Opcode