Updated Basic Assembly tutorial (markdown)

Collin Clark 2017-12-30 23:55:38 -05:00
parent bf14634d04
commit 89ab80e3e7

@ -279,7 +279,7 @@ General syntax for each line of the assembly code:
```assembly ```assembly
label: mnemonic destination, source ; comment label: mnemonic destination, source ; comment
``` ```
You can prefix any line with a name and a semicolon, this will define a label which is a symbolic name for the memory address of the code or data following it. During the assembly process, each mention of a label is replaced by this address and therefore makes them immediate values. We will see labels in more detail in the next section. You can prefix any line with a name and a colon, this will define a label which is a symbolic name for the memory address of the code or data following it. During the assembly process, each mention of a label is replaced by this address and therefore makes them immediate values. We will see labels in more detail in the next section.
Each instruction has a mnemonic to help remember it, the move instruction's mnemonic is MOV. Each instruction has a mnemonic to help remember it, the move instruction's mnemonic is MOV.
The instruction's mnemonic is followed by one or two operands. There are 3 types of operands in the game: memory operand, register operand and immediate value operand. The instruction's mnemonic is followed by one or two operands. There are 3 types of operands in the game: memory operand, register operand and immediate value operand.