This commit is contained in:
2026-04-29 14:00:55 -05:00
parent c9984d0985
commit ec0b209bc6
6 changed files with 262 additions and 5 deletions

View File

@@ -3,7 +3,14 @@ Operations
Operations take either 0 or 1 parameter. The ones that take a parameter, it can be either a int8, int16 or int32.
The binary of the opcode is: XXYY.YYYY, where XX defines the parameter type, and YY.YYYY is the instruction. For the XX values:
Instructions follow this logic:
00 ~ 9F : no parameter
A0 ~ BF : int8 (1 byte)
C0 ~ DF : int16 (2 bytes)
E0 ~ FF : int32 (4 bytes)
The operations of 1, 2 and 4 bytes are always interchangeable by adding/subtracting 0x20.
,----------- no parameter
| ,-------- int8
@@ -12,7 +19,7 @@ The binary of the opcode is: XXYY.YYYY, where XX defines the parameter type, and
NP I8 I16 I32 Opc Instruction Description
Stack operations:
a0 c0 e0 pushn [int] Push int
a0 c0 e0 pushi [int] Push int
a1 c1 e1 pushc [index] Push constant
a2 c2 e2 pushf [function] Push function id
00 pushz Push zero (or false)