x86-64 ASM - The Stack

C Memory Layout

What’s on the stack?

Push and Pop Instructions

As mentioned previously, a push will add a value to the stack and a pop will take off a value from the stack. Automatically, RSP will be adjusted to account for values pushed and popped off (subtract 8 for push, add 8 for pop).

You can either push directly from a register or from memory in the form r/mX

---

~ Jakob Nacanaynay
(nack-uh-nigh-nigh)
he/him/his