mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-18 02:06:43 +00:00
Updated Basic Assembly tutorial (markdown)
parent
f33ab9ca65
commit
8b148c3bb4
@ -264,12 +264,12 @@ So we have seen how programmers can use programming languages to write computer
|
||||
Let's start with some an example:
|
||||
```assembly
|
||||
MOV A, 1
|
||||
INT 9
|
||||
HWI 1
|
||||
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.
|
||||
|
||||
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 INT 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.
|
||||
|
||||
The first line can be read as "Move `1` into `A`"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user