get_register_set() instead of getBitPSW(11)
This commit is contained in:
parent
7f0f4ba4c5
commit
4a41ee6b1f
2 changed files with 4 additions and 3 deletions
6
cpu.cpp
6
cpu.cpp
|
@ -137,7 +137,7 @@ void cpu::reset()
|
|||
uint16_t cpu::getRegister(const int nr, const rm_selection_t mode_selection) const
|
||||
{
|
||||
if (nr < 6) {
|
||||
int set = getBitPSW(11);
|
||||
int set = get_register_set();
|
||||
|
||||
return regs0_5[set][nr];
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ uint16_t cpu::getRegister(const int nr, const rm_selection_t mode_selection) con
|
|||
void cpu::setRegister(const int nr, const uint16_t value, const rm_selection_t mode_selection)
|
||||
{
|
||||
if (nr < 6) {
|
||||
int set = getBitPSW(11);
|
||||
int set = get_register_set();
|
||||
|
||||
regs0_5[set][nr] = value;
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ bool cpu::put_result(const gam_rc_t & g, const uint16_t value)
|
|||
uint16_t cpu::addRegister(const int nr, const rm_selection_t mode_selection, const uint16_t value)
|
||||
{
|
||||
if (nr < 6)
|
||||
return regs0_5[getBitPSW(11)][nr] += value;
|
||||
return regs0_5[get_register_set()][nr] += value;
|
||||
|
||||
if (nr == 6) {
|
||||
if (mode_selection == rm_prev)
|
||||
|
|
1
cpu.h
1
cpu.h
|
@ -160,6 +160,7 @@ public:
|
|||
bool getBitPSW(const int bit) const;
|
||||
int getPSW_runmode() const { return psw >> 14; };
|
||||
int getPSW_prev_runmode() const { return (psw >> 12) & 3; };
|
||||
bool get_register_set() const { return !!(psw & 04000); }
|
||||
|
||||
void setPSW_c(const bool v);
|
||||
void setPSW_v(const bool v);
|
||||
|
|
Loading…
Add table
Reference in a new issue