How do I set up a page and use the page as a stack. I'm writing in 64 bits assembly and I'm using paging. I know pages can be set up to be used for Code (execute) or Data. But how do create a page such that pushes and pops will write to/Read from the page.
Thanks
Setting up a page as a stack
Re: Setting up a page as a stack
Stack memory is mapped using ordinary data pages, just load the right pointer into RSP register. Do you really now x86 basics?
Ok, just remember that stack grows from top to down (i.e. push decrements RSP and pop increments by the size of operand).
Ok, just remember that stack grows from top to down (i.e. push decrements RSP and pop increments by the size of operand).