Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for marking absolute stack access #4

Open
fachat opened this issue Apr 10, 2024 · 0 comments
Open

Support for marking absolute stack access #4

fachat opened this issue Apr 10, 2024 · 0 comments
Milestone

Comments

@fachat
Copy link
Owner

fachat commented Apr 10, 2024

In "classic" 6502 program sometimes it is assumed that the stack is fixed at $01xx, and is accessed directly, like

     TSX
     LDA $0101,X

to get a parameter value from the stack.

This, however, conflicts with some more modern 6502 variants, most notably the 65816, where the stack can be moved to anywhere in bank zero.

So, to allow 65816-based systems to identify programs that use this approach (and either handle it, or refuse to load it), a new header bit is proposed:

     mode.8 :     dstack   0= (ignored)    1= program accesses stack directly via addresses $01xx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant