cannot replace the run-mode bits nor the set of registers
This commit is contained in:
parent
30a6c9229c
commit
2334daff16
1 changed files with 6 additions and 3 deletions
9
cpu.cpp
9
cpu.cpp
|
@ -277,11 +277,14 @@ int cpu::getPSW_spl() const
|
||||||
|
|
||||||
void cpu::setPSW(const uint16_t v, const bool limited)
|
void cpu::setPSW(const uint16_t v, const bool limited)
|
||||||
{
|
{
|
||||||
if (limited)
|
if (limited) {
|
||||||
psw = (v & 0174037) | (psw & 0174340);
|
// cannot replace the run-mode bits nor the set of registers
|
||||||
else
|
psw = (psw & 177400) | (v & 0377);
|
||||||
|
}
|
||||||
|
else {
|
||||||
psw = v & 0174377; // mask off 'unused' bits (8-10)
|
psw = v & 0174377; // mask off 'unused' bits (8-10)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void cpu::setPSW_flags_nzv(const uint16_t value, const word_mode_t word_mode)
|
void cpu::setPSW_flags_nzv(const uint16_t value, const word_mode_t word_mode)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue