From 994e71cc7cd06203c97cf5538e44fadf473506f7 Mon Sep 17 00:00:00 2001 From: depsterr Date: Sun, 19 Dec 2021 12:50:35 +0100 Subject: [PATCH] add variable length instruction idea --- doc/ideas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ideas.md b/doc/ideas.md index 6bdfad8..f760aac 100644 --- a/doc/ideas.md +++ b/doc/ideas.md @@ -57,7 +57,7 @@ # Encoding stuff -* Constant size 2 byte instructions (not including operands) +* Common instructions are 1 byte and a lookup table is used to run a function executing said instruction. Less common instructions will have the first byte take them to a function which reads the next byte, allowing for a tree of instructions. * All words realistically **have** to be the same size for the stack to make sense. Which size should be used? This feels like it could easily become machine dependant. * Possibly go for the highest you have, 8 bytes? Would mean that performance would be god awful on 32 bit machines. I might be ok with that? Am I?