Skip to content

clarify stack alignment #1

@Meister-anon

Description

@Meister-anon

"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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions