aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-09-17 01:28:55 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commitb095aedd386e076d1f5a56b7384b836e653387d1 (patch)
treea9dd7d7cbcfba19005ce8aa9486a70d31091d5c3 /doc
parent2928e5f74983f5dd33bc65f192298af87996a037 (diff)
Add support for r8-r15 registers, pass args to registers directly (sys-v)
Diffstat (limited to 'doc')
-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).