aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-02 12:11:49 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-02 12:11:49 +0100
commit854349100c4e98b7913c4024417fc028acb14277 (patch)
treee8c65213e27e438cfe208c3fb0c8e7fdeac77579
parentf1d57fc638aa554f2d78e64bdc8d7e19c31a1a07 (diff)
downloadtr8vm-854349100c4e98b7913c4024417fc028acb14277.tar.gz
tr8vm-854349100c4e98b7913c4024417fc028acb14277.zip
Documented .equ and small improvements
-rw-r--r--README.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/README.md b/README.md
index f9318d4..2886be8 100644
--- a/README.md
+++ b/README.md
@@ -129,9 +129,11 @@ Example:
; can use the frame int o sync
ld a, 0xff
ld x, 0
+ ; lower byte of the address
ld b, <int_handler
ld [a : x], b
inc x
+ # higher byte of the address
ld b, >int_handler
ld [a : x], b
@@ -211,7 +213,7 @@ branching instructions:
inc a
```
-#### Directives
+#### Assembler directives
.org addr
Set the address to that value. By default the starting address is `0x0000`.
@@ -223,6 +225,9 @@ and `>`for the high byte.
.dw imm [, imm]
Literal word.
+.equ label imm
+Define a label assigning an arbitrary immediate.
+
#### Load and Store
LD r1, r2