cpu/decoder - little code improvement
This commit is contained in:
parent
a9b0b37a2e
commit
7902ac4641
1 changed files with 3 additions and 5 deletions
|
@ -256,11 +256,9 @@ void Cpu::executeInstruction()
|
||||||
state.zero = (data == 0);
|
state.zero = (data == 0);
|
||||||
break;
|
break;
|
||||||
case 0x40: // BIT
|
case 0x40: // BIT
|
||||||
{
|
|
||||||
state.zero = (data & (1 << bit)) == 0;
|
state.zero = (data & (1 << bit)) == 0;
|
||||||
state.subtract = false;
|
state.subtract = false;
|
||||||
state.halfcarry = true;
|
state.halfcarry = true;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 0x80: // RES
|
case 0x80: // RES
|
||||||
data &= ~(1 << bit);
|
data &= ~(1 << bit);
|
||||||
|
|
Loading…
Reference in a new issue