1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Reveal 16-bit stack pointer when asked, regardless of mode.

This commit is contained in:
Thomas Harte 2023-07-31 17:08:02 -04:00
parent e61a4eb5a9
commit 2262725010

View File

@ -14,10 +14,7 @@ uint16_t ProcessorBase::value_of(Register r) const {
switch (r) {
case Register::ProgramCounter: return registers_.pc;
case Register::LastOperationAddress: return last_operation_pc_;
case Register::StackPointer:
return
(registers_.s.full & (registers_.emulation_flag ? 0xff : 0xffff)) |
(registers_.emulation_flag ? 0x100 : 0x000);
case Register::StackPointer: return registers_.s.full;
case Register::Flags: return get_flags();
case Register::A: return registers_.a.full;
case Register::X: return registers_.x.full;