Updated Basic Assembly tutorial (markdown)

Simon Fortier 2017-11-12 22:27:14 -05:00
parent da44e2dd28
commit ae59588ca3

@ -263,11 +263,11 @@ So we have seen how programmers can use programming languages to write computer
### Instruction and operands ### Instruction and operands
Let's start with some an example: Let's start with some an example:
```assembly ```assembly
MOV A, 1 MOV A, 0x1337
HWI 1 HWI 9
BRK BRK
``` ```
You can try to execute it yourself by copying it directly into the game editor and uploading it. The code simply displays a warning icon on top of your controlled unit. You can try to execute it yourself by copying it directly into the game editor and uploading it. The code simply displays the number 0x1337 using the [Hologram Projector hardware](https://github.com/simon987/Much-Assembly-Required/wiki/Hardware:-Hologram-Projector)
The first instruction is a MOV (move) instruction. The syntax for the MOV instruction is MOV *destination*, *source* and it copies whatever is specified for the source operand in the destination operand, overwriting what was there before the instruction. The HWI instruction will be explained in more detail later. The first instruction is a MOV (move) instruction. The syntax for the MOV instruction is MOV *destination*, *source* and it copies whatever is specified for the source operand in the destination operand, overwriting what was there before the instruction. The HWI instruction will be explained in more detail later.