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

clarify stack alignment #1

Open
Meister-anon opened this issue Feb 7, 2021 · 0 comments
Open

clarify stack alignment #1

Meister-anon opened this issue Feb 7, 2021 · 0 comments

Comments

@Meister-anon
Copy link

"The stack contains words (just like books - look how far my analogy extends!). However, all we know about the stack is the location of the most recent item - this is the stack pointer. The stack pointer must thus be a multiple of 4. This ensures the stack is properly aligned."

Why does that explain why the stack must be multiplied by 4, is it because words are 4 bytes?
And how does that cause alignment? Further what does it mean to be aligned?

I'm still reading so maybe that will be answered further down, but I think it would be good to add those answers up here, so readers can better follow without question/getting lost.

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