aboutsummaryrefslogtreecommitdiff
path: root/lib/inst.h
AgeCommit message (Collapse)Author
2023-11-01Added stack based versions of MSET and MGETAryadev Chavali
Essentially they use the stack for their one and only operand. This allows user level control, in particular it allows for loops to work correctly while using these operands.
2023-11-01Added instruction to get the size of some allocationAryadev Chavali
This will allow for more library level code to be written. For example, say you wanted to write a generic byte level reversal algorithm for dynamically sized allocations. Getting the size of the allocation would be fundamental to this operation.
2023-11-01Added instructions for allocating, setting, getting and deleting heap memoryAryadev Chavali
One may allocate any number of (bytes|hwords|words), set or get some index from allocated memory, and delete heap memory. The idea is that all the relevant datums will be on the stack, so no register usage. This means no instructions should use register space at all (other than POP, which I'm debating about currently). Register space is purely for users.
2023-11-01Introduced a new mathematical operator MULTAryadev Chavali
Thankfully multiplication, like addition, is the same under 2s complement as it is for unsigned numbers. So I just need to implement those versions to be fine.
2023-11-01Removed OP_EQ signed versions as they're uselessAryadev Chavali
A negative number under 2s complement can never be equal to its positive as the top bit *must* be on. If two numbers are equivalent bit-by-bit then they are equal for both signed and unsigned numbers.
2023-10-31Moved inst module to libAryadev Chavali
As it has no dependencies on vm specifically, and it's more necessary for any vendors who wish to target the virtual machine, it makes more sense for inst to be a lib module rather than a vm module.