What is the function of the push / pop instructions used on registers in x86 assembly?
Asked 07 September, 2021
Viewed 2.9K times
  • 55
Votes

When reading about assembler I often come across people writing that they push a certain register of the processor and pop it again later to restore it's previous state.

  • How can you push a register? Where is it pushed on? Why is this needed?
  • Does this boil down to a single processor instruction or is it more complex?

5 Answer