stack limit register write fix

This commit is contained in:
folkert van heusden 2022-04-10 21:11:29 +02:00
parent d7aa353bd7
commit ab1cf139dc

View file

@ -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();
if (a & 1)
v = (v & 0xff00) | value;
else
v = (v & 0x00ff) | (value << 8);
else
v = (v & 0xff00) | value;
c -> setStackLimitRegister(v);
return v;