public static function opcode39(Core $core)
{
$temp_var = $core->registerA;
if ($core->FCarry) {
$temp_var |= 0x100;
}
if ($core->FHalfCarry) {
$temp_var |= 0x200;
}
if ($core->FSubtract) {
$temp_var |= 0x400;
}
$core->registerA = ($temp_var = $core->DAATable[$temp_var]) >> 8;
$core->FZero = ($temp_var & 0x80) == 0x80;
$core->FSubtract = ($temp_var & 0x40) == 0x40;
$core->FHalfCarry = ($temp_var & 0x20) == 0x20;
$core->FCarry = ($temp_var & 0x10) == 0x10;
}