Updated Basic Assembly tutorial (markdown)

Arthur Paulino 2018-01-03 15:29:39 -03:00
parent 1e242844d4
commit 0b6ed9dc8c

@ -442,6 +442,4 @@ We use the term *push* when we add a piece of data on top of the stack and *pop*
Visual representation of the stack:
![Visual representation of the stack](link to picture)
We can notice that this implementation of the stack is actually upside-down compared to a real-world stack of items: the stack grows downwards in memory, towards lower addresses. The important thing to remember is that the bottom of the stack is at a fixed address and that the top of the stack changes when an item is *pushed* on the stack or *popped* out. In the game's CPU, the **stack pointer** (SP) register always points to the top of the stack and the **base pointer** always points to the base of the current **stack frame**
You can now take a look at the [assembly program examples](https://github.com/simon987/Much-Assembly-Required/wiki/Assembly-program-examples).
We can notice that this implementation of the stack is actually upside-down compared to a real-world stack of items: the stack grows downwards in memory, towards lower addresses. The important thing to remember is that the bottom of the stack is at a fixed address and that the top of the stack changes when an item is *pushed* on the stack or *popped* out. In the game's CPU, the **stack pointer** (SP) register always points to the top of the stack and the **base pointer** always points to the base of the current **stack frame**.