Hacker News new | ask | show | jobs
by pelliphant 2268 days ago
There is one thing here that I don't really understand:

In the first 2 examples, it says:

"If you pop (fetch) a value from the stack, RSP decreases by 8"

But when I step through it, it seems to add 8 on a pop, not subtract (and vice versa for push), or am I missing something?

1 comments

Woops, you're right. Thanks for pointing it out, I'll fix it, they should be the other way around.

You're decreasing the stack, but increasing RSP. Because the stack "grows down".