initialize stack limit register with something saner

This commit is contained in:
folkert van heusden 2023-03-26 15:28:31 +02:00
parent dc936730c4
commit ebbcbee78f
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1
2 changed files with 3 additions and 1 deletions

View file

@ -743,6 +743,8 @@ void bus::write(const uint16_t addr_in, const word_mode_t word_mode, uint16_t va
else
v = (v & 0x00ff) | (value << 8);
v |= 0377;
c->setStackLimitRegister(v);
return;

2
cpu.h
View file

@ -32,7 +32,7 @@ private:
uint16_t pc { 0 };
uint16_t psw { 0 };
uint16_t fpsr { 0 };
uint16_t stackLimitRegister { 0 };
uint16_t stackLimitRegister { 0377 };
uint64_t instruction_count { 0 };
uint64_t running_since { 0 };