Updated Basic Assembly tutorial (markdown)

Simon Fortier 2017-11-15 17:29:12 -05:00
parent 147bba8f7f
commit d8b931ec97

@ -328,7 +328,7 @@ A = 0x0002 # The complete result is Y:A = 0x00010002
If the result is greater than 65536 and Y is overwritten, the carry flag (CF) and the overflow flag (OF) are set, otherwise they are both reset to 0 (More information on the FLAGS register in the next section). If the result is greater than 65536 and Y is overwritten, the carry flag (CF) and the overflow flag (OF) are set, otherwise they are both reset to 0 (More information on the FLAGS register in the next section).
**BRK** **BRK**
Sets the break flag, which stops the execution until the next game tick (see TODO). Sets the break flag, which stops the execution until the next game tick (see [execution cycle](https://github.com/simon987/Much-Assembly-Required/wiki/CPU#execution-cycle)).
### Conditional execution ### Conditional execution
@ -442,6 +442,4 @@ Visual representation of the stack:
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** 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).
### Exemple code
//todo: walk through of exemple code from MAR-Exemple-Code repo