1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-26 10:29:31 +00:00

Fix standard exception stack write order.

This commit is contained in:
Thomas Harte 2022-06-08 16:15:11 -04:00
parent 670201fcc2
commit da8e6737c6

View File

@ -409,15 +409,14 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
// Push status and current program counter.
// Write order is wacky here, but I think it's correct.
registers_[15].l -= 6;
Access(captured_status_); // ns
registers_[15].l += 4;
registers_[15].l -= 2;
Access(instruction_address_.low); // ns
registers_[15].l -= 2;
Access(instruction_address_.high); // nS
registers_[15].l -= 4;
Access(captured_status_); // ns
registers_[15].l += 2;
Access(instruction_address_.high); // nS
registers_[15].l -= 2;
// Grab new program counter.