mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Reveal 16-bit stack pointer when asked, regardless of mode.
This commit is contained in:
parent
e61a4eb5a9
commit
2262725010
@ -14,10 +14,7 @@ uint16_t ProcessorBase::value_of(Register r) const {
|
|||||||
switch (r) {
|
switch (r) {
|
||||||
case Register::ProgramCounter: return registers_.pc;
|
case Register::ProgramCounter: return registers_.pc;
|
||||||
case Register::LastOperationAddress: return last_operation_pc_;
|
case Register::LastOperationAddress: return last_operation_pc_;
|
||||||
case Register::StackPointer:
|
case Register::StackPointer: return registers_.s.full;
|
||||||
return
|
|
||||||
(registers_.s.full & (registers_.emulation_flag ? 0xff : 0xffff)) |
|
|
||||||
(registers_.emulation_flag ? 0x100 : 0x000);
|
|
||||||
case Register::Flags: return get_flags();
|
case Register::Flags: return get_flags();
|
||||||
case Register::A: return registers_.a.full;
|
case Register::A: return registers_.a.full;
|
||||||
case Register::X: return registers_.x.full;
|
case Register::X: return registers_.x.full;
|
||||||
|
Loading…
Reference in New Issue
Block a user