summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-07-27 20:12:16 -0400
committerIan Moffett <ian@osmora.org>2024-07-27 20:12:16 -0400
commitf01d439e7c1b49b8597377f6832b76f16eb446da (patch)
tree4c9c6e239bbe5977dd9505d15be4c68141c87c3d /README.md
parentaa082a9541135aec56ec246f588668e4fd85e0d3 (diff)
Prefix immediates with '#'
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'README.md')
-rw-r--r--README.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/README.md b/README.md
index fb4e782..69e013c 100644
--- a/README.md
+++ b/README.md
@@ -41,9 +41,9 @@ Bitwise logic operations can write to all registers except `v0`-`v7`, `x0` and `
#### Example
```
/* Set x1 to 5 */
-mov x1, 5
+mov x1, #5
/* Ands x1 (which equals 5) with 1 */
-and x1, 1
+and x1, #1
/* x1 now equals 1 */
```
@@ -63,7 +63,7 @@ Arithmetic operations can write to all registers except `v0`-`v7`, `x0` and `pc`
#### Example
```
/* Set x1 to 5 */
-mov x1, 5
+mov x1, #5
/* Increment x1 */
inc x1
/* x1 now equals 6 */
@@ -89,11 +89,11 @@ Control flow instructions are used to control which instructions the CPU execute
#### Example
```
/* Subtract x2 from x1 */
-sub x1, x2
-beq x1, 0, zero
-mov x1, 2
+sub x1, x1, x2
+beq x1, #0, zero
+mov x1, #2
zero:
-mov x1, 3
+mov x1, #3
/* Iff x1 - x2 = 0, x1 equals 3 */
/* Iff x1 - x1 != 0, x1 equals 2 */
```