We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

Stack: Difference between revisions

From SnesLab
Jump to: navigation, search
(pulling takes one cycle more)
(top of the stack)
Line 5: Line 5:
In [[emulation mode]] it wraps within page one.<sup>[2]</sup>
In [[emulation mode]] it wraps within page one.<sup>[2]</sup>


The stack grows towards zero.  These instructions push things to the stack:
The stack grows towards zero, but the most recently pushed byte is nontheless called the top of the stack.  These instructions push things to the stack:


* [[PHA]]
* [[PHA]]

Revision as of 16:17, 22 July 2024

The Stack is a buffer which remembers the state of subroutines that are currently executing.

On the 65c816, the stack is always in bank zero. It can be thousands of bytes deep.[1]

In emulation mode it wraps within page one.[2]

The stack grows towards zero, but the most recently pushed byte is nontheless called the top of the stack. These instructions push things to the stack:

Pulling takes one cycle more than pushing. These instructions pull things from the stack:

Note the lack of PLK.

See Also

Reference

  1. https://wilsonminesco.com/816myths
  2. Clark, Bruce. http://www.6502.org/tutorials/65c816opcodes.html#5.1.1