summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/ability.fspec30
1 files changed, 8 insertions, 22 deletions
diff --git a/spec/ability.fspec b/spec/ability.fspec
index 5a695a0..fa1281b 100644
--- a/spec/ability.fspec
+++ b/spec/ability.fspec
@@ -42,30 +42,16 @@ struct dat {
// PUSH<v> | 0x02 | Pushes `v` to the stack.
// PUSHR<r?> | 0x03 | Pushes the contents of register `r?` to the stack.
// POP<r?> [v] | 0x04 | Pops `v` into register `r?`.
-// INCR<r?> | 0x05 | Increments the register `r?` by one.
-// OP<op> [...] | 0x06 | Performs operation specified by the `op`, and pushes the result to the stack.
-// QUEUE<len> (...) | 0x07 | Queues next `len` bytes for execution for the next `IO` instruction.
+// OP<op> [...] | 0x05 | Performs operation specified by the `op`, and pushes the result to the stack.
+// QUEUE<len> (...) | 0x06 | Queues next `len` bytes for execution for the next `IO` instruction.
// * * The code is executed before or after `IO` instruction, depending whether VM is packing or unpacking.
-// IO<sz> (...) | 0x08 | Unpacking: Reads data from external VM input (usually a file) to register pointed by `r1`.
-// * * Packing: Writes data to external VM output (usually a file) from register pointed by `r1`.
+// IO<sz> [r?] (...) | 0x07 | Unpacking: Reads data from external VM input (usually a file) to register `r?`.
+// * * Packing: Writes data to external VM output (usually a file) from register `r?`.
// * * `sz` is the size of the element in bits.
// * * Rest of the stack is the number of elements, if empty, the elements to read/write is 1.
-// EXEC<r?> [r??] (...) | 0x09 | Sets `r1` to `r??` and executes instructions stored in register `r?`.
-// * * Rest of the stack is the number of times to execute, if empty, execution happens only once.
-// * * `r1` will be saved and restored during this instruction.
-// CALL<r?> (...) | 0x0A | Calls a function. The name of the function is stored in register `r?`.
-// JMP<off> | 0x0B | Jumps to the `off` (in bytes).
-// JMPIF<off> [v] | 0x0C | Performs `JMP`, if `v` is true.
-// STRUCT<r?> [r??] | 0x0D | Describes register `r?` as struct structure. register `r??` contains the name of the struct.
-// SELECT<r?> | 0x0E | Describes register `r?` as select structure.
-// FIELD<r?> (...) | 0x0F | Links field to last structure. register `r?` contains the name of the field.
-// * * Rest of the stack contains register indices for registers that are instances of this field.
-// BSZ<s:1, v> [sz] | 0x10 | Describes last field as a primitive field. `s` describes whether the field is signed. `v` describes how the
-// * * field should be represented. `sz` contains the size of field in bits.
-// REF<r?> | 0x11 | Describes field as a substructure. register `r?` contains the structure definition.
-// FDIMENSION<sz> | 0x12 | Adds fixed dimension to a field. `sz` indicates the size of the dimension.
-// VDIMENSION | 0x13 | Adds variable length dimension to a field.
-// ENUM<r?> | 0x14 | Links field to a enum
+// CALL<r?> (...) | 0x08 | Calls a function. The name of the function is stored in register `r?`.
+// JMP<off> | 0x09 | Jumps to the `off` (in bytes).
+// JMPIF<off> [v] | 0x0A | Performs `JMP`, if `v` is true.
//
// List of operations for the `OP` instruction:
// Name | Hex | Argc | Description
@@ -91,7 +77,7 @@ struct dat {
// CTERNARY | 0x13 | 3 | Conditional ternary operation `v1 ? v2 : v3`
// SUBSCRIPT | 0x14 | 2 | Subscript operation `v1[v2]`
//
-// List of visuals for the `PIO` instruction:
+// List of visuals:
// Name | Hex | Representation
// NUL | 0x00 | None
// DEC | 0x01 | Decimal