GameBoy\Opcode::opcode232 PHP Méthode

opcode232() public static méthode

ADD SP, n
public static opcode232 ( Core $core )
$core Core
    public static function opcode232(Core $core)
    {
        $signedByte = $core->usbtsb($core->memoryRead($core->programCounter));
        $temp_value = $core->nswtuw($core->stackPointer + $signedByte);
        $core->FCarry = (($core->stackPointer ^ $signedByte ^ $temp_value) & 0x100) == 0x100;
        $core->FHalfCarry = (($core->stackPointer ^ $signedByte ^ $temp_value) & 0x10) == 0x10;
        $core->stackPointer = $temp_value;
        $core->programCounter = $core->programCounter + 1 & 0xffff;
        $core->FZero = $core->FSubtract = false;
    }
Opcode