From b095aedd386e076d1f5a56b7384b836e653387d1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 17 Sep 2019 01:28:55 +0200 Subject: Add support for r8-r15 registers, pass args to registers directly (sys-v) --- doc/Documentation.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc') 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). -- cgit v1.2.3