stack limit register write fix
This commit is contained in:
parent
d7aa353bd7
commit
ab1cf139dc
1 changed files with 4 additions and 4 deletions
4
bus.cpp
4
bus.cpp
|
@ -392,9 +392,9 @@ uint16_t bus::write(const uint16_t a, const bool word_mode, uint16_t value, cons
|
||||||
uint16_t v = c -> getStackLimitRegister();
|
uint16_t v = c -> getStackLimitRegister();
|
||||||
|
|
||||||
if (a & 1)
|
if (a & 1)
|
||||||
v = (v & 0xff00) | value;
|
|
||||||
else
|
|
||||||
v = (v & 0x00ff) | (value << 8);
|
v = (v & 0x00ff) | (value << 8);
|
||||||
|
else
|
||||||
|
v = (v & 0xff00) | value;
|
||||||
|
|
||||||
c -> setStackLimitRegister(v);
|
c -> setStackLimitRegister(v);
|
||||||
return v;
|
return v;
|
||||||
|
|
Loading…
Add table
Reference in a new issue