cleaner implementation of cpu::getBitPSW
This commit is contained in:
parent
439c34abab
commit
b8c7d78ed6
1 changed files with 1 additions and 1 deletions
2
cpu.cpp
2
cpu.cpp
|
@ -157,7 +157,7 @@ void cpu::addRegister(const int nr, const bool prev_mode, const uint16_t value)
|
|||
|
||||
bool cpu::getBitPSW(const int bit) const
|
||||
{
|
||||
return !!(psw & (1 << bit));
|
||||
return (psw >> bit) & 1;
|
||||
}
|
||||
|
||||
bool cpu::getPSW_c() const
|
||||
|
|
Loading…
Add table
Reference in a new issue