aboutsummaryrefslogtreecommitdiff
path: root/doc/Documentation.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/Documentation.md')
-rw-r--r--doc/Documentation.md5
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/Documentation.md b/doc/Documentation.md
index 88647a7..afc890c 100644
--- a/doc/Documentation.md
+++ b/doc/Documentation.md
@@ -1,5 +1,5 @@
# Instructions
-Variable length instructions. Instruction size ranges from 1 to 5 bytes.
+Variable length instructions. Instruction size ranges from 1 to 4 bytes.
## Instruction formats
Instructions can be in 7 different formats:
1. 1 byte: Opcode(u8)
@@ -16,8 +16,7 @@ Instructions can be in 7 different formats:
6.2 Opcode(u8) + register(i8) + intermediate(u16)\
6.3 Opcode(u8) + register(i8) + data(u16)\
6.4 Opcode(u8) + flags(u8) + num_local_var_reg(u16)\
-6.5 Opcode(u8) + stack_offset(i24)
-7. 5 bytes: Opcode(u8) + index(u8) + index(u16) + num_args(u8)
+6.5 Opcode(u8) + index(u8) + index(u16)
## Registers
Registers have a range of 128. Local variables start from register 0 and increment while parameters start from -1
and decrement. Registers have the scope of functions and reset after instructions reach a new function (AMAL_OP_FUNC_START).